At 06:28 26/11/2006, you wrote: >Below is the output for p5.random.p,p5.random.p1 and m0 >My question is >in p5.random.p, variance for P is 5e-10. >But in p5.random.p1,variance for P is 0.039293. >Why they are so different?
Please do as the posting guide asks and reply to the list, not just the individual. a - I might not know the answer b - the discussion might help others You give very brief details of the underlying problem so it is hard to know what information will help you most. Remember, if a computer estimates a non-negative quantity as very small perhaps it is really zero. I think you might benefit from reading Pinheiro and Bates, again see the posting list. >Is that wrong to write Y~P+(1|P) if I consider P as random effect? I suppose terminology differs but I would have said the model with Y~1+(1|P) was a random intercept model >Also in p5.random.p and m0, it seems that there are little >difference in estimate for P. Why? > >thanks, > >Aimin Yan > > > p5.random.p <- > lmer(Y~P+(1|P),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) > > summary(p5.random.p) >Generalized linear mixed model fit using Laplace >Formula: Y ~ P + (1 | P) > Data: p5 > Family: binomial(logit link) > AIC BIC logLik deviance > 1423 1452 -705.4 1411 >Random effects: > Groups Name Variance Std.Dev. > P (Intercept) 5e-10 2.2361e-05 >number of obs: 1030, groups: P, 5 > >Estimated scale (compare to 1 ) 0.9999938 > >Fixed effects: > Estimate Std. Error z value Pr(>|z|) >(Intercept) 0.153404 0.160599 0.9552 0.3395 >P8ABP -0.422636 0.202181 -2.0904 0.0366 * >P8adh 0.009634 0.194826 0.0495 0.9606 >P9pap 0.108536 0.218875 0.4959 0.6200 >P9RNT 0.376122 0.271957 1.3830 0.1667 >--- >Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > >Correlation of Fixed Effects: > (Intr) P8ABP P8adh P9pap >P8ABP -0.794 >P8adh -0.824 0.655 >P9pap -0.734 0.583 0.605 >P9RNT -0.591 0.469 0.487 0.433 > > p5.random.p1 <- > lmer(Y~1+(1|P),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) > > summary(p5.random.p1) >Generalized linear mixed model fit using Laplace >Formula: Y ~ 1 + (1 | P) > Data: p5 > Family: binomial(logit link) > AIC BIC logLik deviance > 1425 1435 -710.6 1421 >Random effects: > Groups Name Variance Std.Dev. > P (Intercept) 0.039293 0.19823 >number of obs: 1030, groups: P, 5 > >Estimated scale (compare to 1 ) 0.9984311 > >Fixed effects: > Estimate Std. Error z value Pr(>|z|) >(Intercept) 0.1362 0.1109 1.228 0.219 > > > m0<-glm(Y~P,data=p5,family=binomial(logit)) > > summary(m0) > >Call: >glm(formula = Y ~ P, family = binomial(logit), data = p5) > >Deviance Residuals: > Min 1Q Median 3Q Max >-1.4086 -1.2476 0.9626 1.1088 1.2933 > >Coefficients: > Estimate Std. Error z value Pr(>|z|) >(Intercept) 0.154151 0.160604 0.960 0.3371 >P8ABP -0.422415 0.202180 -2.089 0.0367 * >P8adh 0.009355 0.194831 0.048 0.9617 >P9pap 0.108214 0.218881 0.494 0.6210 >P9RNT 0.374693 0.271945 1.378 0.1683 >--- >Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > >(Dispersion parameter for binomial family taken to be 1) > > Null deviance: 1425.5 on 1029 degrees of freedom >Residual deviance: 1410.8 on 1025 degrees of freedom >AIC: 1420.8 > >Number of Fisher Scoring iterations: 4 > > >At 06:13 AM 11/24/2006, you wrote: >>At 21:52 23/11/2006, Aimin Yan wrote: >>>consider p as random effect with 5 levels, what is difference between these >>>two models? >>> >>> > p5.random.p <- lmer(Y >>>~p+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) >>> > p5.random.p1 <- lmer(Y >>>~1+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) >> >>Well, try them and see. Then if you cannot understand the output tell us >>a) what you found >>b) how it differed from what you expected >> >>>in addtion, I try these two models, it seems they are same. >>>what is the difference between these two model. Is this a cell means model? >>>m00 <- glm(sc ~aa-1,data = p5) >>>m000 <- glm(sc ~1+aa-1,data = p5) >> >>See above >> >> >>>thanks, >>> >>>Aimin Yan >> >>Michael Dewey >>http://www.aghmed.fsnet.co.uk > > > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.431 / Virus Database: 268.14.16/551 - Release Date: >25/11/2006 10:55 Michael Dewey http://www.aghmed.fsnet.co.uk ______________________________________________ R-help@stat.math.ethz.ch 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.