Packages

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 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

  9. 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

  10. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  11. 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

  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. 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

  14. 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)

  15. def ms: Double

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

  16. 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

  17. 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

  18. 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

  19. 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

  20. def pstddev: Double

    Compute the population standard deviation of 'self' vector.

    Compute the population standard deviation of 'self' vector.

    See also

    VectorD for pvariance

  21. def rms: Double

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

  22. 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

  23. val self: VectorD
  24. 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

  25. 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).

  26. def stddev: Double

    Compute the standard deviation of 'self' vector.

  27. 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

  28. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped