[R] Mixed effects model with binomial errors - problem
RFTW
l.temarvelde at nioo.knaw.nl
Fri Sep 19 08:15:32 CEST 2008
anyone?
RFTW wrote:
>
> ok... the model now runs properly (say, without errors). Now about the
> result.
> These are the averages per treatments
>
> tapply(VecesArbolCo.VecesCo.C1,T2,mean)
> a b c d
> 0.49 0.56 0.45 0.58
>
>
> I run this very simple model
>
>> summary(model1<-lmer(cbind(VisitsExpTree,TotalVisits-VisitsExpTree)~
>> treatment +(1|Individual), family=binomial, data=r))
>
> Generalized linear mixed model fit by the Laplace approximation
> Formula: cbind(VisitsExpTree,TotalVisits-VisitsExpTree)~ treatment
> +(1|Individual)
> Data: r
> AIC BIC logLik deviance
> 242.3 255.9 -116.2 232.3
> Random effects:
> Groups Name Variance Std.Dev.
> Individuo (Intercept) 0.14075 0.37517
> Number of obs: 112, groups: Individuo, 37
>
> Fixed effects:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) 0.37228 0.19031 1.9562 0.05044 .
> treatmentb 0.03367 0.24520 0.1373 0.89079
> treatmentc -0.60606 0.23330 -2.5978 0.00938 **
> treatmentd -0.25504 0.22790 -1.1191 0.26311
> ---
> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
> Correlation of Fixed Effects:
> (Intr) T2b T2c
> T2b -0.675
> T2c -0.697 0.543
> T2d -0.720 0.544 0.581
>
>
> wouldnt we expect the intercept to be roughtly the mean of treatment a?
> and thus the estimate of treatmentb to be +0.07, c: -0.04 and d: +0.09
> roughly?
>
> Is this model just completely not estimating well, or are the estimates
> not the 'real values'.
>
> I tried to get teh predict function to give me the 4 predicted values
> based on the model, but i havent succeeded in doing so. maybe someone can
> help me on that one too (predict(model1,type="response") doesnt work)
>
> thnx
>
--
View this message in context: http://www.nabble.com/Mixed-effects-model-with-binomial-errors----problem-tp19413327p19566778.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list