Bootstrap Logistic Regression Background The glm( ) function in R does so-called generalized linear models. The theory of these is usually covered in the categorical data course. (and sometimes in sta503) The response variable in this problem, remission or r, is categorical with values "0" or "1"; They are independent but not identically distributed Bernoulli random variables. Yi = Bernoulli(pi) where the parameter vector p = (p1, . . ., pn) is related to the so-called linear predictor vector eta = (eta1, . . ., etan) by the link function etai = logit(pi) = log(pi / (1 - pi)) or the inverse p_i = exp( etai)/ [1 + exp( etai) ] and the linear predictor vector has the usual form of a mean function in ordinary linear regression etai = Xi beta where X is the so-called design matrix for the problem (the rows are cases and the columns are predictor variables) and beta is a vector of regression coefficients. The predictor variables in this data set is LI. Now The R code out <- glm(r ~ LI, family = "binomial", data=remission) summary(out) pred <- predict(out, type = "response") n <- length(remission$LI) nboot <- 999 a.star <- double(nboot) b.star <- double(nboot) for (i in 1:nboot) { r.star <- rbinom(n, 1, pred) out.star <- glm(r.star ~ LI, family = "binomial") a.star[i] <- coef(out.star)[1] b.star[i] <- coef(out.star)[2] }