compare.fits: Compare Fits

Description Usage Arguments Value See Also Examples

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

1
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

fitdvcov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

rlme documentation built on May 2, 2019, 3:47 p.m.