Click or drag to resize
ANCOVA Class
Analyzes a one-way classification model with covariates.
Inheritance Hierarchy
SystemObject
  Imsl.StatANCOVA

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class ANCOVA

The ANCOVA type exposes the following members.

Constructors
  NameDescription
Public methodANCOVA
Constructs a one-way classification model with covariates.
Top
Methods
  NameDescription
Public methodCompute
Performs one-way analysis of covariance assuming parallelism and returns an array containing the parallelism tests for the one-way analysis of covariance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAdjustedANOVA
Returns the partial sum of squares for the one-way analysis of covariance.
Public methodGetANCOVA
Returns an array containing the one-way analysis of covariance assuming parallelism.
Public methodGetANOVATables
Returns a matrix of size ngroup by 15 containing the analysis of variance tables for each linear regression model fitted separately to each treatment group.
Public methodGetCoefficientTable
Returns a matrix of size ncov + 1 by 4 containing statistics for a linear regression model fitted separately for each of the ngroup treatment groups.
Public methodGetCoefficientTables
Returns an array containing statistics for a linear regression model fitted separately for all ngroup treatments.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMeans
Returns a matrix containing the unadjusted means for the covariates and the response variate and the means for the response variate adjusted for the covariates.
Public methodGetModelCoefficients
Returns a matrix containing statistics for the regression coefficients for the model assuming parallelism.
Public methodGetR
Returns the R matrix from the QR decomposition.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVarCovAdjustedMeans
Returns a matrix containing the estimated variances and covariances for the adjusted means assuming parallelism.
Public methodGetVarCovCoefficients
Returns a matrix containing the estimated variances and covariances for the coefficients returned using GetModelCoefficients.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyNumberOfMissing
The number of cases with missing values in covariates or responses. Cases with any missing values are not used in the analysis.
Top
Remarks

Class ANCOVA performs analyses for models that combine the features of a one-way analysis of variance model with that of a multiple linear regression model. The basic one-way analysis of covariance model is

y_{ij}=\beta_{0i}+\beta_{1}x_{ij1}+\beta_{2}
            x_{ij2}+\ldots+\beta_mx_{ijm}+\varepsilon_{ij}
i=1,2,\ldots,ngroup
j=1,2,\ldots,n_i
where, ngroup is the number of treatment groups, the observed value of y_{ij} constitutes the j-th response in the i-th group, \beta_{0i} denotes the y intercept for the regression function for the i-th group, \beta_{1}, \beta_{2}, ..., \beta_{m} are the regression coefficients for the covariates, and the \varepsilon_{ij}'s are independently distributed normal errors with mean zero and variance \sigma^2. This model allows the regression function for each group to have different intercepts. However, the remaining m regression coefficients are the same for each group, i.e., the regression functions are parallel.

In practice, sometimes the regression functions are not parallel. In addition to estimates for the model assuming parallelism (parallel regression planes), ANCOVA computes estimates and summary statistics for the separate regressions of each group. These estimates can be examined using the methods GetCoefficientTables and GetANOVATables.

Estimates for the \beta_{0i}'s and \beta_{1}, \beta_{2}, ..., \beta_{m} in the model assuming parallelism are returned using the method GetModelCoefficients. Summary statistics are also computed for this model and returned by the Compute method.

The adjusted group means, stored in the last column of xymean, are computed using the formula:

\hat{\beta}_{0i}+\hat{\beta}_{1}
            \overline{x}_{1}+\hat{\beta}_{2}\overline{x}_{2}+\ldots+
            \hat{\beta}_{m}\overline{x}_{m}

where xymean is the matrix returned by GetMeans and ncov is the number of covariates.

The estimated covariance between the i_{1}
            -th and i_{2}-th adjusted group mean is given by

\nu_{i_{1}i_{2}}+\sum_{r=1}^{m}\sum_{s=1}^{m}
            \overline{x}_{r}\nu_{k+r, k+s}\overline{x}_{s}+\sum_{r=1}^{m}
            \overline{x}_{r}\nu_{i_{1}, k+r}+\sum_{r=1}^{m}\overline{x}_{r}
            \nu_{i_{2}, k+r}

where \nu_{pq} is the entry in covb[p-1][q-1], where covb is returned by GetVarCovCoefficients and is the estimated covariance between the p-th and q-th estimated coefficients in the regression function.

See Also