Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

From: Gustaf Rydevik <gustaf.rydevik_at_gmail.com>
Date: Wed, 23 Jul 2008 11:46:36 +0200

On Wed, Jul 23, 2008 at 4:54 AM, Michal J. Figurski <Michal_at_mail.med.upenn.edu> wrote:
> Dear all,
>
> Since you guys are frank, let me be frank as well. I did not ask anyone to
> impose on me their point of view on bootstrap. It's my impression that this is
> what you guys are trying to do - that's sad. Some of your emails in this
> discussion are worth less than junk mail - particularly the ones from Mr Harold
> Doran. It's even more sad that you use junior members of this forum to make fun
> and intimidate.
>
> Apparently, even with all your expertise and education in this area, many of you
> - experts - do not understand what I am talking about. You seem to be so much
> affixed to your expertise, that you can't see anything beyond it.
>
> Dear experts: if you do not wish to answer a question, why do you take time to
> send useless emails?
>
> Honestly, if you wished to help and educate me, these words as in email below
> would never see light. Now that is expert advice. I am impressed!
>
>
> --
> Michal J. Figurski
>

It seems as if there are two issues here: 1) Learning R
and
2) Learning statistics.

As for 1), here is a solution to what i think you wanted to do (and as always, if you had provided some sample data and code attempts it would have made things easier):

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)

I've never tried using any of the prepackaged bootstrap functions since it's so easy to write your own. And I never really figured out why you wanted to split the data in two, unless you do it before bootstrapping to have a test set.

Regards,

Gustaf

-- 
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik

______________________________________________
R-help_at_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.
Received on Wed 23 Jul 2008 - 10:30:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Jul 2008 - 14:32:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive