VarianceComponent<T>

Models & Types · AiDotNet.Regression.MixedEffects

Represents variance components in a mixed-effects model.

For Beginners

Variance components tell you “how much variation comes from where”.

For students in schools:

  • Random effect variance: How much do schools differ on average?
  • Residual variance: How much do individual students vary within schools?

This decomposition is important for:

  • Understanding your data structure
  • Computing Intraclass Correlation (ICC)
  • Assessing if random effects are needed

How It Works

Variance components partition the total variance in the response into parts attributable to different sources (fixed effects, random effects, residual).

Constructors

Constructor Summary
VarianceComponent()
VarianceComponent(string name) Initializes a new variance component.

Properties

Property Summary
Matrix<T> CorrelationMatrix { get; set; } Gets or sets the correlation matrix for this variance component.
Matrix<T> CovarianceMatrix { get; set; } Gets or sets the covariance matrix for this variance component.
T ConfidenceIntervalLower { get; set; } Gets or sets the lower bound of the confidence interval.
T ConfidenceIntervalUpper { get; set; } Gets or sets the upper bound of the confidence interval.
T StandardDeviation { get; } Gets the standard deviation (square root of variance).
T StandardError { get; set; } Gets or sets the standard error of the variance estimate.
T Variance { get; set; } Gets or sets the estimated variance for this component.
string Name { get; set; } Gets or sets the name of this variance component.

Methods

Method Summary
T GetVarianceProportion(T totalVariance) Computes the proportion of total variance explained by this component.