vee: Estimates of the Variance Components

Description Usage Arguments Details Value Author(s) References Examples

Description

For cluster correlated data, estimates of the variance components are computed as discussed in Section 8.4 of Kloke and McKean (2014). There are two choices: if the value of method is mm then the medain and MAD estimators while if it has the value dhl the Hodges-Lehmann estimate and the Wilcoxon dispersion function is used. The mm type are robust estimators while the dhl type are efficient estimators.

Usage

1
vee(ehat,center,method='dhl',scores=wscores)

Arguments

ehat

N x 1 vector of residuals

center

N x 1 vector denoteing the center or cluster

method

option indicator as discussed above

scores

score function used in the fit of ehat

Details

Estimates are discussed in detail in Section 8.4 of Kloke and McKean (2014).

Value

sigb2

estimate of the variance of the random effect

sige2

estimate of the variance of the random error

Author(s)

John Kloke <kloke@biostat.wisc.edu>

References

Kloke, J.D., McKean, J.W., and Rashid, M. (2009), Rank-based estimation and associat ed inferences for linear models with cluster correlated errors, Journal of the American Statistical Association, 104, 384-390.

Kloke, J. and McKean, J.W. (2014), Nonparametric statistical methods using R, Boca Raton, FL: Chapman-Hall.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
m<-10  # number of blocks
n<-10  # number number
k<-2   # number of treatments
N<-m*n # total sample size

x<-rnorm(N)                       # covariate
w<-sample(c(0,1),N, replace=TRUE) # treatment indicator
block<-rep(1:m,n)                 # m blocks of size n

X<-cbind(x,w)

Z<-model.matrix(~as.factor(block)-1)
b<-rnorm(m,sd=3)
e<-rnorm(N)
y<-Z%*% b+e

fit<-jrfit(X,y,block)
summary(fit)
vee(fit$resid,fit$block,method='mm')

vee(fit$resid,fit$block)

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

Related to vee in kloke/jrfit...