compare.fits {rlme} | R Documentation |
Compare Fits
Description
Compares two model fits. It returns tdbeta value and cfits values of two fits. The function uses the fixed effects estimates from fit 1 and fit 2 along with the covariance of the rank-based fit.
Usage
compare.fits(x, fit1, fit2)
Arguments
x |
Matrix of covariates |
fit1 |
A class of type rlme. |
fit2 |
A class of type rlme. |
Value
Returns tdbeta and cfits values.
See Also
Examples
data(schools)
model = y ~ 1 + sex + age + (1 | region) + (1 | region:school)
# Extract covariants into matrix
cov = as.matrix(data.frame(schools[,"sex"], schools[,"age"]))
# Fit the models using each method
reml.fit = rlme(model, schools, method="reml")
gr.fit = rlme(model, schools, method="gr")
compare.fits(cov, reml.fit, gr.fit)
[Package rlme version 0.5 Index]