You might want to check out the rms package (regression modeling strategies). So lrm is a logistic regression model, and if fit is the name of your output, you will have something like this:
fit=lrm(disease ~ age + study + rcs(bmi,3), x=T, y=T, data=dataf) fit robcov(fit, cluster=dataf$id) bootcov(fit,cluster=dataf$id)
You must specify x=T , y=T in the model statement. rcs stands for bounded 3-node cubic splines.
David f
source share