Bootstrap with regression model. Resample the residuals. library(bootstrap) data(cell) plot(cell) ffit <- lm( log.surv ~ dose + I(dose^2), data=cell ) #### curve(predict(ffit, data.frame(dose = x)), add = TRUE) coefficients(ffit) resid <- residuals(ffit) pred <- predict(ffit) alpha.hat <- coefficients(ffit)[1] beta1.hat <- coefficients(ffit)[2] beta2.hat <- coefficients(ffit)[3] x <- dose n <- nrow(cell) nboot <- 1000 alpha.star <- double(nboot) beta1.star <- double(nboot) ### place holder for results beta2.star <- double(nboot) ### place holder for results for (i in 1:nboot) { e.star <- sample(x = resid, size = n, replace = TRUE) y.star <- pred + e.star bfit <- lm(y.star ~ x + I(x^2)) alpha.star[i] <- coef(bfit)[1] beta1.star[i] <- coef(bfit)[2] beta2.star[i] <- coef(bfit)[3] } beta1.hat sd(beta1.star) beta2.hat sd(beta2.star) beta2.hat / sd(beta2.star) summary(ffit)