[R] GLMMs fitted with lmer (R) & glimmix (SAS
Douglas Bates
bates at stat.wisc.edu
Sun Jan 6 23:00:52 CET 2008
On Jan 4, 2008 6:21 PM, Andrea Previtali <aprevitali at hotmail.com> wrote:
>
> Sorry, I realized that somehow the message got truncated. Here is the
> remaining part of the SAS output:
>
> Solutions for Fixed Effects:
>
> Effect DIST DW ELI SEX SEAS Estimate Std. Error
> DF t Value Pr > |t|
>
> Intercept -4.6540
> 0.6878 17 -6.77 <.0001
>
> DIST*DW 0 0 1.4641 0.4115 3077
> 3.56 0.0004
> DIST*DW 0 1 1.1333 0.4028 3077
> 2.81 0.0049
> DIST*DW 1 0 1.3456 0.3745
> 3077 3.59 0.0003
> DIST*DW 1 1 0 . .
> . .
>
> SEX*ELI 0 0 1.2633 0.4155
> 3077 3.04 0.0024
> SEX*ELI 0 1 0.6569 0.4140 3077 1.59
> 0.1126
> SEX*ELI 1 0 1.0728 0.4364
> 3077 2.46 0.0140
> SEX*ELI 1 1 0 .
> . . .
>
> WT 0.00758 0.01912
> 3077 0.40 0.6918
>
> SEAS 0 0.7839 0.1588
> 3077 4.94 <.0001
>
> SEAS 1 0 .
> . . .
>
> DEN -0.01343 0.002588
> 3077 -5.19 <.0001
>
> Type III Tests of Fixed Effects
>
> Effect NUM.DF DEN.DF F Value
> Pr > F
> DIST*DW 3 3077 6.06
> 0.0004
> SEX*ELI 3 3077 6.30
> 0.0003
> WT 1 3077 0.16
> 0.6918
> SEAS 1 3077 24.37
> <.0001
> DEN 1 3077 26.94
> <.0001
At least on my mail reader the copies of the output ended up with
wrapped lines and, apparently, some changes in the spacing. I enclose
two text files, glimmix.txt and glmer.txt, that are my reconstructions
of the originals. Please let me know if I have not reconstructed them
correctly. In particular, i don't think I got the first table of
"Solutions for Fixed Effects:" in the glimmix.txt file correct. It
seems to mix t statistics and F statistics in ways that I don't
understand.
Another thing I don't understand is what the Pseudo-Likelihood is.
Perhaps it is what I would call the penalized weighted residual sum of
squares. The likelihood reported by lmer and based on the binomial
distribution is very different.
If you want to compare coefficients I suggest using
options(contrasts = c("contr.SAS", "contr.poly")
and assure that SEX, DIST, DW and ELI are factors, then call lmer.
This will ensure that the SEX, DIST, DW and ELI terms and their
interactions are represented by contrasts in which the last level is
the reference level (the SAS convention) as opposed to the first level
(the R convention).
Also, you may be confusing the S language formula terms with the SAS
formula terms. In R the asterisk denotes crossing of terms and the :
is used for an interaction. Thus SEX*ELI is equivalent to SEX + ELI +
SEX:ELI in R. In SAS, it is the interaction that is written as
SEX*ELI. I suggest that you change your SAS formula to include main
effects for SEX, ELI, DIST and DW.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glmer.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080106/d0a31621/attachment-0004.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glmmmix.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080106/d0a31621/attachment-0005.txt
More information about the R-help
mailing list