Skip to content
Prev 260195 / 398502 Next

Question on approximations of full logistic regression model

I tried to make a histogram of bootstrap distribution of my logistic 
model according to "Regression Model Strategy" (pp197-200). Attached is 
the histogram I made. The figure demonstrates bootstrap distribution of 
log odds ratio from my logistic model. The solid curve is a kernel 
density estimate and dashed curve is a normal density with the dame mean 
and standard deviation as the bootstrapped values. Vertical lines 
indicate asymmetric 0.9, 0.95, and 0,99 two-sided confidence limits for 
the log odds ratio based on quantiles of the bootstrap values.

It seems to me that bootstrap distribution is normal and that estimation 
of confidence interval is, ummm, accurate.

Am I right?

The codes I used are followings;

 > library(rms)
 > b <- bootcov(MyModel.penalized, B=1000, coef.reps=T)
 > s <- summary(MyModel.penalized, x1=c(1.0, 1.5), x2=c(1.0, 1.5), 
ClinicalScore=c(4,6), procedure=c("E", "A"))
 > X <- predict(MyModel.penalized, data.frame(T1=c(1.0, 1.5), T2=c(1.0, 
1.5), ClinicalScore=c(4,6), procedure=c("E", "A")), type="x")
 > X
   Intercept  x1  x2  ClinicalScore   procedure=E
1         1 1.0 1.0              4             1
2         1 1.5 1.5              6             0
 > Xdif <- X[2, drop=F] -X[1, drop=F]
 > Xdif
   Intercept  x1  x2  ClinicalScore   procedure=E
2         0 0.5 0.5              2            -1
 > conf <- c(.9, .95, .99)
 > bootplot(b, X=Xdif, conf.int=conf, xlim=c(0, 6))

 > boot.log.odds.ratio <- b$boot.Coef %*% t(Xdif)
 > sd <- sqrt(var(boot.log.odds.ratio))
 > sd
           2
2 0.7412509
 > z <- seq(0, 6, length=104)
 > lines(z, dnorm(z, mean=mean(boot.log.odds.ratio), sd = sd), lty=2)
(11/05/16 22:01), Frank Harrell wrote:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x5factor_final-CI-histogram.pdf
Type: application/pdf
Size: 103774 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110518/00b34a96/attachment.pdf>