Bootstrap regression model, Resample the cases. library(bootstrap) data(cell) plot(cell) ffit <- lm(log.surv ~ dose + I(dose^2), data=cell) summary(ffit) curve(predict(ffit, data.frame(dose = x)), add = TRUE) alpha.hat <- coef(ffit)[1] beta1.hat <- coef(ffit)[2] beta2.hat <- coef(ffit)[3] x <- cell$dose y <- cell$log.surv n <- nrow(cell) nboot <- 1000 alpha.star <- double(nboot) beta1.star <- double(nboot) beta2.star <- double(nboot) for (i in 1:nboot) { k.star <- sample(x=1:n, size=n, replace = TRUE) x.star <- x[k.star] y.star <- y[k.star] bfit <- lm(y.star ~ x.star + I(x.star^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) Try the same code but with lm replaced by rlm( ) and use psi=psi.huber (load library(MASS) first )