[R] Bootstrap ICC estimate with nested data
Bliese, Paul D MAJ USAMH
paul.bliese at us.army.mil
Tue Sep 21 15:41:29 CEST 2004
I would appreciate some thoughts on using the bootstrap functions in the
library "bootstrap" to estimate confidence intervals of ICC values
calculated in lme.
In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance
the ICC in the following example is 0.116:
> tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT)
> VarCorr(tmod)
IDGRUP = pdLogChol(1)
Variance StdDev
(Intercept) 0.1829931 0.427777
Residual 1.3907732 1.179310
> 0.18299/(0.18299+1.39077)
[1] 0.1162757
Using the bootstrap library, I can set up theta to do the ICC as follows:
>theta<-function(x,DATA){tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=DATA[x,])
OUT<-as.numeric(VarCorr(tmod)[[1]])/(as.numeric(VarCorr(tmod)[[1]])+as.numer
ic(VarCorr(tmod)[[2]]))
return(OUT)}
Finally, I can run the bootstrap-t confidence limit function (or other
functions) as follows:
> bootout<-boott(1:nrow(TDAT),100,theta,data=TDAT)
This seems to work, but the estimates also seem strange. For intance, the
observed ICC value is larger than the 95% confidence intervals provided by
the bootstrap. It occurs to me that the results might be strange because
the sampling with replacement is being done without regard to group
membership. That is, I might select individual 1 from group 1 10 times
(even though in the sample the group only has 5 members), and I might not
select any individuals from group 2.
My fundamental question is: "What are people's thoughts about using
bootstaping in nested data? Does one have to sample with replacement taking
into consideration the group structure in the data?" If so, any suggestions
on how to do this?
Paul Bliese
US Army Medical Research Unit - Europe
More information about the R-help
mailing list