Forgot to add my thinkings:
I think it over and think that the problem may be the
argument(data$y<-exp(data$x1+data$x2+data$x3+data$x4+data$x5+data$x6+data$x7+data$x8)/(1+(data$x1+data$x2+data$x3+data$x4+data$x5+data$x6+data$x7+data$x8))
),which maybe not correctly set for my
model:logit(y)=x1+x2+x3+x4+x5+x6+x7+x8,
Thanks very much!


On 8/31/06, zhijie zhang <[EMAIL PROTECTED]> wrote:
>
>  Dear friends,
>  I'm doing a simulation on logistic regression model, but the programs
> can't work well,please help me to correct it and give some suggestions.
> My programs:
> data<-matrix(rnorm(400),ncol=8)  #sample size is 50
> data<-data.frame(data)
> names(data)<-c(paste("x",1:8,sep=""))  #8 independent variables,x1-x8;
> #logistic regression model is logit(y)=x1+x2+x3+x4+x5+x6+x7+x8
> data$y<-exp(data$x1+data$x2+data$x3+data$x4+data$x5+data$x6+data$x7+data$x8)/(1+(data$x1+data$x2+data$x3+data$x4+data$x5+data$x6+data$x7+data$x8))
>
> logist<-glm(y~.,family=binomial(),data=simdata)
> *Warning messages:*
> 1: algorithm can't converge in: glm.fit(x = X, y = Y, weights = weights,
> start = start, etastart = etastart,
> 2: the probability is 0 or 1 in: glm.fit (x = X, y = Y, weights = weights,
> start = start, etastart = etastart,
> --
> With Kind Regards,
> Zhi Jie,Zhang ,PHD
> Department of Epidemiology
> School of Public Health
> Fudan University
>



-- 
With Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan University

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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