c

scalation.stat

MM_StatVector

final class MM_StatVector extends AnyVal

The MM_StatVector value class provides methods for computing statistics on data vectors. Both maximum likelihood and unbiased estimators are supported. Unbiased should only be used on sample (not population) data. Ex: It can be used to support the Method of Independent Replications (MIR). For efficiency, MM_StatVector is a value class that enriches the VectorD. The corresponding implicit conversion in the stat package object.

See also

stackoverflow.com/questions/14861862/how-do-you-enrich-value-classes-without-overhead -----------------------------------------------------------------------------

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MM_StatVector
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MM_StatVector(self: VectorD)

    self

    the underlying object to be accessed via the 'self' accessor

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def acorr(k: Int = 1): Double

    Compute the 'k'-lag auto-correlation of 'self' vector.

    Compute the 'k'-lag auto-correlation of 'self' vector.

    k

    the lag parameter

  5. def acov(k: Int = 1): Double

    Compute the 'k'-lag auto-covariance of 'self' vector.

    Compute the 'k'-lag auto-covariance of 'self' vector.

    k

    the lag parameter

  6. def amedian: Double

    Compute the averaged median, which is the median when 'dim' is odd and the average of the median and the next'k'-median when 'dim' is even.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def ci(mu_: Double, ihw: Double): (Double, Double)

    Return the confidence interval as (lower, upper) after calling either interval (unknown standard deviation) or interval2 (know standard deviation).

    Return the confidence interval as (lower, upper) after calling either interval (unknown standard deviation) or interval2 (know standard deviation).

    mu_

    the sample mean

    ihw

    the interval half width

  9. def corr(y: VectorD): Double

    Compute Pearson's correlation of 'self' vector with vector 'y'.

    Compute Pearson's correlation of 'self' vector with vector 'y'.

    y

    the other vector

  10. def cov(y: VectorD): Double

    Compute the sample covariance of 'self' vector with vector 'y'.

    Compute the sample covariance of 'self' vector with vector 'y'.

    y

    the other vector

  11. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  12. def interval(p: Double = .95): Double

    Compute the confidence interval half-width for the given confidence level.

    Compute the confidence interval half-width for the given confidence level. The Confidence Interval (CI) is on the mean, i.e., CI = [mean +/- interval].

    p

    the confidence level

  13. def interval2(sig: Double, p: Double = .95): Double

    Compute the confidence interval half-width for the given confidence level.

    Compute the confidence interval half-width for the given confidence level. The Confidence Interval (CI) is on the mean, i.e., CI = [mean +/- interval]. This method assumes that the population standard deviation is known. uses the Standard Normal distribution.

    sig

    the population standard deviation

    p

    the confidence level

  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def kurtosis(unbiased: Boolean = false): Double

    Compute the kurtosis of 'self' vector.

    Compute the kurtosis of 'self' vector. High kurtosis (> 3) indicates a distribution with heavier tails than a Normal distribution.

    E(X - μ)4 / σ4

    unbiased

    whether to shift the result so Normal is at 0 rather than 3

    See also

    www.mathworks.com/help/stats/kurtosis.html

  16. def median(k: Int = (self.dim+1)/2): Double

    Compute the 'k'-median ('k'-th smallest value) of 'self' vector.

    Compute the 'k'-median ('k'-th smallest value) of 'self' vector. Setting 'k = (dim+1)/2' gives the regular median.

    k

    the type of median (k-th smallest value)

  17. def ms: Double

    Compute the mean square (ms) of 'self' vector.

  18. def pcorr(y: VectorD): Double

    Compute the population Pearson's correlation of 'self' vector with vector 'y'.

    Compute the population Pearson's correlation of 'self' vector with vector 'y'.

    y

    the other vector

  19. def pcov(y: VectorD): Double

    Compute the population covariance of 'self' vector with vector 'y'.

    Compute the population covariance of 'self' vector with vector 'y'.

    y

    the other vector

  20. def precise(threshold: Double = .2, p: Double = .95): Boolean

    Determine if the Confidence Interval (CI) on the mean is tight enough.

    Determine if the Confidence Interval (CI) on the mean is tight enough.

    threshold

    the cut-off value for CI to be considered tight

    p

    the confidence level

  21. def precision(p: Double = .95): Double

    Compute the relative precision, i.e., the ratio of the confidence interval half-width and the mean.

    Compute the relative precision, i.e., the ratio of the confidence interval half-width and the mean.

    p

    the confidence level

  22. def pstddev: Double

    Compute the population standard deviation of 'self' vector.

    Compute the population standard deviation of 'self' vector.

    See also

    VectorD for pvariance

  23. def rms: Double

    Compute the root mean square (rms) of 'self' vector.

  24. def scorr(y: VectorD): Double

    Compute Spearman's rank correlation of 'self' vector with vector 'y'.

    Compute Spearman's rank correlation of 'self' vector with vector 'y'.

    y

    the other vector

    See also

    en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient

  25. val self: VectorD
  26. def skew(unbiased: Boolean = false): Double

    Compute the skewness of 'self' vector.

    Compute the skewness of 'self' vector. Negative skewness indicates the distribution is elongated on the left, zero skewness indicates it is symmetric, and positive skewness indicates it is elongated on the right.

    E(X - μ)3 / σ3

    unbiased

    whether to correct for bias

    See also

    www.mathworks.com/help/stats/skewness.html

  27. def standardize: VectorD

    Produce a standardized version of the vector by subtracting the mean and dividing by the standard deviation (e.g., Normal -> Standard Normal).

  28. def stddev: Double

    Compute the standard deviation of 'self' vector.

  29. def t_sigma(p: Double = .95): Double

    Compute the product of the critical value from the t-distribution and the standard deviation of the vector.

    Compute the product of the critical value from the t-distribution and the standard deviation of the vector.

    p

    the confidence level

  30. def toString(): String
    Definition Classes
    Any
  31. def z_sigma(p: Double = .95): Double

    Compute the product of the critical value from the z-distribution (Standard Normal) and the standard deviation of the vector.

    Compute the product of the critical value from the z-distribution (Standard Normal) and the standard deviation of the vector.

    p

    the confidence level

Inherited from AnyVal

Inherited from Any

Ungrouped