Questions tagged [lmer]

Function of the lme4 package for running linear mixed-effects regressions.

Function of the package for running linear mixed-effects regressions.

88 questions
1
vote
0 answers

R: Reverting to lme4.0 and still getting inconsistent results

Running R 3.1.0, and I'm having a lot of trouble with lme since the latest 1.0 update. I have a data set I was working with under an older version, getting fine parameter estimates, no issues with collinearity and no failures of convergence. The…
Roder
  • 53
  • 4
1
vote
2 answers

Discrepancy between glmer and difflsmeans for poisson models

I am having trouble understanding some discrepancies in the results between glmer with a poisson model and difflsmeans. Both functions are from the lmerTest package. Basically, glmer tells me the two coefficients are significant at p < 0.05 but when…
user2027051
  • 153
  • 1
  • 1
  • 4
1
vote
3 answers

Simulating an interaction effect in a lmer() model in R

Is there an R package with a function that can: (1) simulate the different values of an interaction variable, (2) plot a graph that demonstrates the effect of the interaction on Y for different values of the terms in interaction, and (3) works well…
neutral
  • 107
  • 4
  • 13
1
vote
1 answer

R: finding the source code that produces the output for S4 slot?

G'day Everyone, When the 'lmer' function in 'lme4' runs its produces an S4 object with a lot of slots. I am interested in one of these slots, namely model@X, and how this 'X' slot output is produced. I want to try reproduce this output for a…
Adam
  • 1,147
  • 3
  • 15
  • 23
1
vote
0 answers

R Piecewise Growth Regression, lmer()

I would like to do a piecewise growth regression with my data, based on Raudenbush/Bryk(1992/2002), Hierarchical Linear Models, p178 - 179. I will have to apply a Multi level Model to do this. I is the lme4-package I will need to use. My data…
0
votes
1 answer

plotLMER3d.fnc : Error for HLMs with many variables

I am currently working on a multilevel model with a high number of variables and interaction terms. So far I have used the plotLMER3d.fnc-function of the LMERConvenienceFunctions-package to obtain 3D plots for some of these interactions.…
Christian
  • 3
  • 1
0
votes
0 answers

R using lmer gives: Error in diag(vcov(object, use.hessian = use.hessian))

There is a strange behaviour when I use lmer: when I save the fit using lmer into an object, let's say fit0, using lmer, I can look at the summary (output not showing): >summary(fit0) If I save the objects using save.image(), close the session and…
giordano
  • 2,954
  • 7
  • 35
  • 57
0
votes
1 answer

Formula Issue when Predicting using LMER

I get the following error when I try to predict using lmer > predict(mm1, newdata = TEST) Error in terms.formula(formula(x, fixed.only = TRUE)) : '.' in formula and no 'data' argument This is what my formula looks like >…
goldisfine
  • 4,742
  • 11
  • 59
  • 83
0
votes
0 answers

Error for predict() with lmer

I'm using a leave-one-out method to evaluate how well a model with one datapoint excluded predicts that datapoint (rotating through all datapoints). The code below has successfully run on essentially the same data with a slightly different DV, so…
0
votes
1 answer

Error message with exactLRT to test for suitability of random intercept in lmer model

I'm trying to use exactLRT to see whether I should include a random intercept in my model. Below is a reproducible example: library(lmer) m.intercept <- lmer(Reaction ~ Days+(1|Subject), data=sleepstudy) m0 <- lm(Reaction ~ Days,…
msoftrain
  • 1,017
  • 8
  • 23
0
votes
0 answers

Standardized coefficients for lmer with accuracy scores

Apologies if I'm making any silly errors, I'm pretty new to R. I have been searching for the answer to my question, but haven't got very far! I need to report standardized coefficients for the predictors in my model. I think I have figured out how…
0
votes
0 answers

Warning message using glmer and mixed

I have a question about warning message when using glmer or mixed model in R. When I'm running these functions I get the following warning message: Advarselsbesked: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model…
Nick
  • 21
  • 3
0
votes
0 answers

How to compute standard errors for predicted data

I am trying to generate standard errors for predicted values. I use the below code to generate the predicted values but it fails to also give the standard errors. ord6 <- veg$ord1-2 laimod.group = lmer(log(lai+0.000019) ~ ord6*plant_growth_form + …
tabtimm
  • 411
  • 3
  • 6
  • 17
0
votes
1 answer

specifying multiple random effects in R lmer (translating from HLM model)

I'm attempting to "translate" a model run in HLM7 software to R lmer syntax. This is from the now-ubiquitous "Math achievement" dataset. The outcome is math achievement score, and in the dataset there are various student-level predictors (such as…
0
votes
1 answer

glmulti , lmer fit (linear mixed models) and gls fit models(lme package)

Why does functions from the glmulti R package not work well on lmer fit (linear mixed models) and gls fit models(lme package): A. To extract model averaged coefficients? Its coef function did not work. I used the glmulti R package on lmer fit…
John KMHG
  • 3
  • 1
  • 3