Dear Masters, first I'd like to wish u all a great 2011 and happy holydays by now,
second (here it come the boring stuff) I have a question to which I hope u would answer: I run a logistic regression by glm(), on the following data type (y1=1,x1=x1); (y2=0,x2=x2);......(yn=0,xn=xn), where the response (y) is abinary outcome on 0,1 amd x is any explanatory variable (continuous or not) observed with the i-th outcome. This is indeed one of the most frequent case when challenged with binary responses, though I know R manages such responses slightly differently (a vector for the successes counts and one for the failures) and I'm not sure wheather my summary.glm gives me any senseful answer at all.... for the purpose I have tried to to emphasize the numbers so to obtain significant results y<-rbinom(2000,1,.7)#response for(i in 1:2000){ euro[i]<-if(y[i]==1){rnorm(1,300,20)#explanatory 1 }else{rnorm(1,50,12)} } for(i in 1:2000){ sex[i]<-if(y[i]==1){sample(c("m","f"),1,prob=c(.8,.2))#explanatory 2 }else{sample(c("m","f"),1,prob=c(.2,.8))} } m<-glm(y~euro+factor(sex),family=binomial) summary(m) My worries: - are the estimates correct? - degrees of freedom exponentiate dramatically (one per cell) , so may I risk to never obtain a significant result? I also take the chance to ask wheater u know any implemented method to plot logistic curves directly out of a glm() model I would like to thank u all by the way Federico Bonofiglio [[alternative HTML version deleted]] ______________________________________________ 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.