final class StatVec extends AnyVal
The StatVec
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, StatVec
is a value class that enriches the VectorD
.
The corresponding implicit conversion in the package object.
- See also
stat.StatVector
for more complete statistical functionsstackoverflow.com/questions/14861862/how-do-you-enrich-value-classes-without-overhead -----------------------------------------------------------------------------
- Alphabetic
- By Inheritance
- StatVec
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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'. If either variance is zero, will result in Not-a-Number (NaN), ruturn one if the vectors are the same, or -0 (indicating undefined).
- y
the other vector
- 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
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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'. Note: should only differ from 'corr' due to round-off errors and NaN issue.
- y
the other vector
- 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
- def pstddev: Double
Compute the population standard deviation of 'self' vector.
Compute the population standard deviation of 'self' vector.
- See also
VectorD for pvariance
- val self: VectorD
- 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).
- def stddev: Double
Compute the standard deviation of 'self' vector.
Compute the standard deviation of 'self' vector.
- See also
VectorD for variance
- def toString(): String
- Definition Classes
- Any