anova.varComp: ANOVA-type analysis of fixed effect parameters

Description Usage Arguments Value Warning Author(s) References See Also Examples

Description

fixef.varComp and anova.varComp test for fixed effect contrasts, as well as providing standard errors, etc.

Usage

1
2
3
4
5
6
## S3 method for class 'varComp'
anova(object, ..., test = c("KR", 'Satterthwaite'), L)
## S3 method for class 'varComp'
fixef(object, Lmat, alpha=.05, test=c('KR', 'Satterthwaite'), ...)
## S3 method for class 'varCompFixEf'
print(x, ...)

Arguments

object,x

An object of class varComp.

Lmat,L

A matrix specifying the linear combinations of fixed effect parameters to be tested for nullity. Each row is a linear combination. If the column names are non-null, the columns will be re-ordered according to the column names of model.matrix(object). In case of a single row matrix, it may also be given as a vector.

alpha

The requested level of test.

test

A character scalar requesting the type of the tests to be performed.

...

For anova.varComp, this may be optional additional varComp objects. For fixef.varComp and print.varCompFixEf, this is not used.

Value

For anova.varComp, this is a data frame with the following columns:

When ... is missing but L is given, each row of L matrix will have a corresponding row in the result, testing the nullity of linear contrasts specified by that row of L. Additionally, an "Overall" row will be the last row, testing the nullity of linear contrasts of all rows of L.

When ... is not missing, L will be ignored and the result will have the same number of rows as the number of varComp objects given (including the first object argument). The order of rows is such that the rank of the fixed effect design matrix is non-decreasing, i.e., smaller models first. The results will be the comparison between the current model vs. the model in the preceding row, except for the first row. For the first row, the model being compared is a null model. If the fixed effect design matrix for the model in first row includes the intercept in its column space, the null model includes only an intercept. If the intercept is not in the column space of the first model, the null model will contain no fixed effects.

When both ... and L are missing, anova.varComp will test each fixed effect parameters together with a last "Overall" row. However, this last row will remove the intercept from the model, if there is one. See example below.

For fixef.varComp, the result is an object with class varCompFixEf. This is a named numeric vector, providing estimates of fixed effect contrasts specified by Lmat. The name will be the row names of Lmat. It has the anova attribute, a numeric matrix with the following columns:

Additionally, the anova attribute also has the Overall attribute, which is a single-row matrix with the same columns as the results of anova.varComp, testing for the overall nullity of linear contrasts specified by Lmat.

print.varCompFixEf prints the result from fixef.varComp and return the argument invisibly.

Warning

  1. When neither ... nor L is given for anova.varComp, the current implementation will test each fixed effect parameter separately. This behavior might be changed in future releases.

  2. When L is not explicitly given, the current implementation will rely on getOption("digits") when trying to find the L matrix that test the difference between adjacent models.

Author(s)

Long Qu

References

Michael G. Kenward and James H. Roger (1997) Small sample inference for fixed effects from restricted maximum likelihood. Biometrics 53, 983–997

Waseem S. Alnosaier (2007) Kenward-Roger Approximate F Test for Fixed Effects in Mixed Linear Models. Oregon State University Department of Statistics Ph.D. Thesis

Fai and Cornelius (1996) Approximate F-tests of multiple degree of freedom hypotheses in generalized least squares analyses of unbalanced split-plot experiments. Journal of Statistical Computation and Simulation 54, 363-378

See Also

satterth.varComp, KR.varComp

Examples

1
2
3
4
5
6
7
8
library(nlme)
data(Oxide)
vcf = varComp(Thickness~Source, Oxide, ~Lot/Wafer)
vcf0 = varComp(Thickness~1, Oxide, ~Lot/Wafer)
fixef(vcf)
anova(vcf, vcf0)
anova(vcf)
anova(vcf, L=diag(1,2)) ## notice the difference in the last row

varComp documentation built on May 2, 2019, 5:15 p.m.