Different standard errors under Mac and PC in "effects" R package I ran a model with lme4::lmer() on my Mac, then predicted values and standard errors of the interaction with effects::Effect(). Then I tested the same code under Windows. Everything was identical besides estimated standard results. How do I solve it? What's the matter? 
Here is a reproducible example. Data is here: https://www.dropbox.com/s/s0zu2hqmmvvqpvx/d.Rdata?dl=1
load("d.Rdata")
m <- lme4::lmer(dep.var ~  ind.var * group.var + (1 | group), data=d)

pred.eff <- effects::Effect(c("ind.var", "group.var"),
                            mod=m, 
                            xlevels=list(group.var=c(-1,0)),
                            se=list(type="Scheffe", level=0.95)
             )

head(pred.eff$se)

On Mac I get SEs: 
[1] 0.2991568 0.2880312 0.2833644 0.2887387 0.3083727 0.1530373

If I run exactly the same code on PC I get much smaller SEs:
[1] 0.09910418 0.05888546 0.02938689 0.06196380 0.12333139 0.06006961

As you can see, the differences aren't small. I suppose something is wrong with my data, as I weren't able to reproduce these discrepancies with simulations.
 A: I don't have a definitive answer, but here are some observations based on trying out your data:


*

*I can replicate your MacOS/larger-SE results on Linux (development version of R, lme4 devel/1.1-18)

*... and independently with a development (effects) branch of the glmmTMB package (function call is identical)

*... and independently with nlme::lme:




m3 <- nlme::lme(dep.var ~  ind.var * group.var,
            random=~1 | group, data=na.omit(d))

This suggests very strongly that your MacOS answer is correct.
I don't know why you're getting a different answer on Windows; the estimated standard errors can in principle be sensitive to numeric differences, but it's a little surprising for what seems to otherwise be a well-behaved model. My main advice for digging into this further would be to look farther upstream:


*

*are the fixed effects estimates the same (fixef(.))? are the estimated standard errors of the coefficients (sqrt(diag(vcov(.))))?

*are you sure that you are using the same data set, code, etc. on both platforms?


A couple of observations about your data:


*

*your response variable takes on the discrete values 1-7. Is this a Likert scale?  Depending on your approach and goals, a linear model might not be the most appropriate choice (it assumes that all neighbouring options are equidistant, e.g. the difference between responses '1' and '2' is the same as between '6' and '7'). One option would be to treat it as an ordinal response (see ordinal::clmm for mixed models with ordinal responses).

*your group.var is continuous. I was a little surprised - with that name, I was expecting it to be a categorical predictor (factor).

*since the predictors vary within groups you might want to consider a random-slopes model (e.g. (ind.var*group.var|group); maybe overkill, but not ridiculous for a large data set)

