search for: thisfit

Displaying 1 result from an estimated 1 matches for "thisfit".

Did you mean: this_id
2007 Jan 26
1
bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
...d(1234567) x<-runif(150) y<-2/3 + pi * x^2 + runif(length(x))/2 plot(x,y) DAT<-data.frame(x,y) NEWDATA<-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...