Displaying 3 results from an estimated 3 matches for "bootobj".
Did you mean:
bootfb
2011 Jul 22
2
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?
> bootObj
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = DAT, statistic = Lp.est, R = 1000...
2007 Jan 26
1
bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
...<-data.frame(x=seq(min(x), max(x), length=50))
library('boot')
myfn<-function(data, whichrows) {
TheseData<-data[whichrows,]
thisLM<-lm( y~poly(x,2), data=TheseData)
thisFit<-predict(thisLM, newdata=NEWDATA)
c(
coef(summary(thisLM))[,"Estimate"]
, thisFit)
}
bootObj<-boot( data=DAT, statistic=myfn, R=1000 )
names(bootObj)
dim(bootObj$t)
sofar<-t(sapply( 1:ncol(bootObj$t), function(thiscolumn) boot.ci(bootObj, type='bca', index=thiscolumn)$bca[4:5] ))
colnames(sofar)<-c("lo", "hi")
NEWDATA<-cbind(NEWDATA, sofar[4:nrow(sof...
2012 Dec 18
0
R function for computing Simultaneous confidence intervals for multinomial proportions
...#chi2 test
nobsT=ddply(mydata,.(pos),summarize,T=length(pos))
nobsT=nobsT[,2]
chisq.test(nobsT)
#######################bootstraping of the mean proportions over the 12
replicats
require(boot)
maf=function(data,index){o=ddply(data[index,],.(pos),summarize,mmea=mean(fobs),.drop=F);as.vector(o[,2])}
bootobj=boot(mydata2,maf,R=9999,stype="i")
confint=ddply(mydata2,.(pos),summarize,mean.prop=mean(fobs))
confint$boot.LOW=-999
confint$boot.UP=-999
for (posi in 1:8){
try({confint$boot.LOW[posi]<-boot.ci(bootobj,0.95,index=posi,type="bca")$bca[4]},silent=T)
try({confint$boot.UP[posi]...