[R] build boot object for boot.ci

From: Daniel Metzler <daniel.metzler_at_gmx.net>
Date: Fri 06 Jan 2006 - 07:36:40 EST


Hello all,

I have a dataset with several variables v1...vn and five groups f1...fn. For each group I took a subset of the data

f1<-subset(data,f==1)
f2<-subset(data,f==2)

and bootstrapped the weighted mean for v1...vn, which worked nicely.

data.boot<-boot(f1$v1,mymean,R=2000)

Afterwards I combined all boot.out$t for each group:

boot$f1v1<-data.boot$t

data.boot<-boot(f1$v2,mymean,R=2000)
boot$f1v2<-data.boot$t
...

data.boot<-boot(f2$v1,mymean,R=2000)
boot$f2v1<-data.boot$t
...

Each row of boot is used as input in a model resulting in boot$W.

My idea is to find (bootstrap) CIs for W. Sorry, I'm new to bootstrap (and R...): Does it make sense to treat the Ws like a bootstrapped variable (and calculate e.g. BCa CIs), because only v1..vn
are bootstrapped? If yes, how is a boot object build on the basis of boot$W?

I'm aware that boot() handles strata, weights and complex functions, but I didn't manage to get my model bootstrapped right. Hopefully, I can circumvent turning my
script upside down.

Daniel



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 06 07:47:23 2006

This archive was generated by hypermail 2.1.8 : Fri 06 Jan 2006 - 14:15:15 EST