search for: respampl

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

Did you mean: resampl
2009 Dec 30
1
boot function returns the same results every time - there appears to be not resampling of the original data.
...to learn how to use the boot function to perform a bootstrap of a regression. I have written a short trial program, shown below. Clearly I have done something wrong as the output of each of the 100 bootstrap values for the regression are exactly the same - there does not appear to be any bootstrap respampling!. What have I done wrong? # Define function to be run. Function will return # beta coefficeint for x. fitter<-function(d) { fit1<-lm(y~x,data=d) print(names(fit1)) print(summary(fit1)) summary(fit1)$coefficients[2,1] } # Define dataframe x<-1:10 y<-x+rnorm(10) d<-data.f...