Displaying 1 result from an estimated 1 matches for "pairedbootstrap".
2012 Dec 06
1
bootstrap based confidence band
I'm trying to find a bootstrap based confidence band for a linear model.
I have created a data set with X and Y
X=runif(n,-1.25,1.25)
e=rnorm(n,0,1)
Y=exp(3*X)+5*sin((30*X)/(2*pi))+2*e
fit=lm(Y~X)
summary(fit)
I define a bootstrap function named PairedBootstrap which is not listed here. Than I try many ways to find the confidence band. One way is to predict Y using the model I get above for 1000 times.
Data.Orig=data.frame(cbind(X,Y))
B=1000
Boot.Result=matrix(nrow=B,ncol=n)
for ( b in 1:B){
Data.Orig.Boot=PairedBootstrap(Data.Orig)
fit.Boot=predic...