varcomp.mrfit: Estimates of variance components for compound symmetric model...

Description Usage Arguments Author(s) References Examples

Description

Returns estimates of variance components for the within and between center variability based on a MR fit.

Usage

1

Arguments

fit

fit from mrfit

Author(s)

John Kloke kloke@biostat.wisc.edu

References

Rashid, M.M., McKean, J.W., Kloke, J.D. (2011). R Estimates and Associated Inferences for Mixed Models with Covariates in a Multi-Center Clinical Trial. Statistics in Biopharmaceutical Research.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
m<-40; n<-4; N<-m*n ; p<-2
block<-rep(1:m,each=n)
Z<-model.matrix(~as.factor(block))
b<-rnorm(m,sd=3)
e<-rnorm(N,sd=1)
y<-Z
x<-matrix(rnorm(p*N),ncol=p)
#### for some reason the following code does not run with R CMD check
#### but runs otherwise ##
# fit<-mrfit(x,y,block,beta0=rep(0,2))
# vc<-varcomp.mrfit(fit)
### interclass correlation coefficient should be close to 9/10 ###
# with(vc, sigmab^2/(sigmab^2+sigmae^2))

kloke/mrfit documentation built on May 20, 2019, 12:34 p.m.