Thank you Gustaf,

I apologize for not including an example data in my first email. Nevertheless, your code worked for me excellently - I only added "55" as the size of sample.

I must admit this code looks so much simpler, compared to SAS. I am beginning to love R, despite some disrespectful experts in this forum.

--
Michal J. Figurski

Gustaf Rydevik wrote:

figurski.df<-data.frame(name=1:109,num1=rnorm(109),num2=rnorm(109),num3=rnorm(109),outcome=sample(c(1,0),109,replace=T))
library(Design)
lrm(outcome~num1+num2+num3,data=figurski.df)$coef
coef<-list()
for (i in 1:100){
tempData<-figurski.df[sample(1:109,replace=T),]
coef[[i]]<-lrm(outcome~num1+num2+num3,data=tempData)$coef
}
coef.df<-data.frame(do.call(rbind,coef))
median(coef.df$num1)


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to