[R-sig-ME] problem with lme4 glmer
Rhodes, Justin S
jrhode@ @end|ng |rom ||||no|@@edu
Mon Oct 19 19:41:38 CEST 2020
Dear R project mixed models users:
We used "lmer4", "glmer" function see below. I attached the data set. The programs and results for SAS and R are shown below. Results are incredibly different, and seem impossible to explain by differences in computational algorithms. The estimates from SAS are reasonable, but the estimates from R are clearly wrong, based on looking at the simple data. We realize that we are underpowered to estimate the random effect here, but it still should give reasonable estimates if it converges, right? Can someone please help us figure this out? Thanks very much for any information
R code:
#import data
Pole<-read.table("Pole.txt",header = TRUE)
#define factors
Pole$Color<-as.factor(Pole$Color)
Pole$Treatment<-as.factor(Pole$Treatment)
Pole$ID<-as.factor(Pole$ID)
#model statement
fm1<-glmer(Outcome ~ Eggs + Color + Treatment + (1|ID), family=binomial, data=Pole)
#results
summary(fm1)
Estimate Std. Error z value Pr(>|z|)
(Intercept) -23.4673 12.4832 -1.880 0.06012 .
Eggs -0.0496 3.4036 -0.015 0.98837
Colorspotted 36.0295 8.4055 4.286 1.82e-05 ***
Treatmentsharp 12.4964 4.1453 3.015 0.00257 **
---
SAS code:
proc genmod data=temp.Pole;
class ID Treatment Color;
model Outcome= Eggs Color Treatment/d=bin link=logit;
repeated subject=ID/type=cs;
run;
Analysis Of GEE Parameter Estimates
Empirical Standard Error Estimates
Parameter
Estimate
Standard
Error
95% Confidence Limits
Z
Pr > |Z|
Intercept
-1.0491
1.3990
-3.7911
1.6928
-0.75
0.4533
Eggs
-0.1071
0.4632
-1.0151
0.8008
-0.23
0.8171
Color
blue
1.5046
0.8476
-0.1567
3.1660
1.78
0.0759
Color
spot
0.0000
0.0000
0.0000
0.0000
.
.
Treatment
blunt
0.3908
0.2841
-0.1660
0.9476
1.38
0.1690
Treatment
sharp
0.0000
0.0000
0.0000
0.0000
.
.
Thanks very much for your help!!
Justin Rhodes
Professor
Department of Psychology
Beckman Institute
405 N Mathews Ave
Urbana, IL 61801
Affiliations: Neuroscience Program, Program for Ecology, Evolution and Conservation Biology, Institute for Genomic Biology, Division of Nutritional Sciences
Email: jrhodes using illinois.edu<mailto:jrhodes using illinois.edu>
Phone: 217-265-0021
Website: http://rhodeslab.beckman.illinois.edu/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Pole2.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20201019/95448317/attachment.txt>
More information about the R-sig-mixed-models
mailing list