c

scalation.stat

StatVectorI

final class StatVectorI extends AnyVal

The StatVectorI value class provides methods for computing statistics on integer values data vectors. Both maximum likelihood and unbiased estimators are supported. Unbiased should only be used on sample (not population) data. For efficiency, StatVectorI is a value class that enriches the VectorI. 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. StatVectorI
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StatVectorI(self: VectorI)

    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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. 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

  8. def corr(y: VectorI): 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: VectorI): 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. 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

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

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

    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)

  16. def mode: Int

    Compute the mode of the 'self' vector, i.e., the value that occurs most frequently.

  17. def ms: Double

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

  18. def pcorr(y: VectorI): 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'. Note: should only differ from 'corr' due to round-off errors and NaN issue.

    y

    the other vector

  19. def pcov(y: VectorI): 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

    VectorI for pvariance

  23. def rms: Double

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

  24. def scorr(y: VectorI): 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: VectorI
  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 stddev: Double

    Compute the standard deviation of 'self' vector.

    Compute the standard deviation of 'self' vector.

    See also

    VectorI for variance

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

  29. def toString(): String
    Definition Classes
    Any
  30. 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