[R] Pr(>|z|) in lme4
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri May 28 11:26:38 CEST 2004
Martin Maechler wrote:
>>>>>>"Dieter" == Dieter Menne <dieter.menne at menne-biomed.de>
>>>>>> on Fri, 28 May 2004 11:04:13 +0200 writes:
>
>
> Dieter> Dear List, I am struggling understanding S4
> Dieter> classes. For example, when GLMM
>
> Dieter> summary(glmmML( whatever))
>
> Dieter> outputs the following line:
>
> Dieter> Estimate Std. Error DF z value Pr(>|z|)
> Dieter> (Intercept) 0.856 0.319 45 2.68 0.0073
>
> Dieter> How do I access the Pr column?
>
> Did you try
>
> s <- summary(glmmML( whatever))
> s ## to give the above
>
> str(s) ## to show the internal structure
>
> If 's' itself is an object with a formal class (aka "S4 class"),
> str() will give sub-optimal (but still helpful) output in the
> current version of R [exposing the current implementation of S4
> slots, which you should never make use of].
>
> Rather in "R Version 2.0.0 Under development (unstable)"
> aka 'R-devel', it gives much nicer output
>
> Martin
>
Well, I wonder what Dieter Menne is looking for. GLMM() is in lme4 and
uses S4 classes. glmmML() is in "glmmML" and uses S3 classes.
In the latter case, the p-values are calculated within print.glmmML()
and the corresponding code is:
1 - pchisq((coef(x)/x$sd)^2, 1)
where x is the glmmML object.
Uwe Ligges
More information about the R-help
mailing list