Sarath Gamini Banneheka
2011-Jul-22 15:36 UTC
[R] Extracting components from a 'boot' class output in R
Dear R user, I used the following to do a bootstrap.>bootObj<-boot(data=DAT, statistic=Lp.est,R=1000,x0=3) I have the following output from the above bootstrap. How can I extract components of the output. For example, how can I extract the std.error?> bootObjORDINARY NONPARAMETRIC BOOTSTRAP Call: boot(data = DAT, statistic = Lp.est, R = 1000, x0 = 3) Bootstrap Statistics : original bias std. error t1* 794.9745 -0.6666341 4.042099 Any help is greatly appreciated. Thank you Sarath Banneheka [[alternative HTML version deleted]]
Weidong Gu
2011-Jul-22 19:42 UTC
[R] Extracting components from a 'boot' class output in R
Sarath, Maybe someone can show a direct access to the statistic. One way to get around is to access 't' component of the boot object which contains individual estimates. so you can extract standard error by sqrt(var(bootObj$t)) Weidong Gu On Fri, Jul 22, 2011 at 11:36 AM, Sarath Gamini Banneheka <banneheka at yahoo.com> wrote:> Dear R user, > > I used the following to do a bootstrap. > > >>bootObj<-boot(data=DAT, statistic=Lp.est, > R=1000,x0=3) > > I have the following output from the above bootstrap. How > can I extract? components of the output. > For example, how can I extract the std.error? > > >> bootObj > > ORDINARY NONPARAMETRIC BOOTSTRAP > > Call: > boot(data = DAT, statistic = Lp.est, R = 1000, x0 = 3) > > Bootstrap Statistics : > ????? original??????? bias????????????? std. error > t1*? 794.9745 -0.6666341??? 4.042099 > > Any help is greatly appreciated. > > Thank you > > > Sarath Banneheka > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >
Tim Hesterberg
2011-Jul-24 04:18 UTC
[R] Extracting components from a 'boot' class output in R
Do names(bootObj) to find out what the components are, and use $ or [[ to extract components. Do help(boot) for a description of components of the object (look in the Value section). That is general advice in R, applying to all kinds of objects - boot, and many other functions such as lm(), return lists with a class added, and you can operate on the object as a list using names(), $, etc. Tim Hesterberg>Dear R user, > >I used the following to do a bootstrap. > > >>bootObj<-boot(data=DAT, statistic=Lp.est, >R=1000,x0=3) > >I have the following output from the above bootstrap. How >can I extract? components of the output. >For example, how can I extract the std.error? > > >> bootObj > >ORDINARY NONPARAMETRIC BOOTSTRAP > >Call: >boot(data = DAT, statistic = Lp.est, R = 1000, x0 = 3) > >Bootstrap Statistics : >????? original??????? bias????????????? std. error >t1*? 794.9745 -0.6666341??? 4.042099 > >Any help is greatly appreciated. > >Thank you > > >Sarath Banneheka
Possibly Parallel Threads
- bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
- [LLVMdev] Need help in converting int to double
- [LLVMdev] Need help in converting int to double
- [LLVMdev] How to enable C as a target
- R function for computing Simultaneous confidence intervals for multinomial proportions