compare.fits | R Documentation |
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.
compare.fits(x, fit1, fit2)
x |
Matrix of covariates |
fit1 |
A class of type rlme. |
fit2 |
A class of type rlme. |
Returns tdbeta and cfits values.
fitdvcov
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.