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
1 answer

Nested model in R

I'm having a huge problem with a nested model I am trying to fit in R. I have response time experiment with 2 conditions with 46 people each and 32 measures each. I would like measures to be nested within people and people nested within conditions,…
Lisa
  • 11
  • 1
1
vote
1 answer

means parameterization of three-way interaction

I have fit a model in lmer that includes a three-way interaction term, where two of the variables are categorical and one is continuous. I am trying to recover the means parameterization for all slopes and intercepts rather than the effects…
1
vote
0 answers

Fixed-effect model matrix is rank deficient

I get the following error when I try to run a mixed effects model: > LMER_MIXED <- as.data.frame(LMER_MIXED) > m2 <- lmer(log_bid_price ~ . - state + (1|state), data = LMER_MIXED) fixed-effect model matrix is rank deficient so dropping 1 column /…
goldisfine
  • 4,742
  • 11
  • 59
  • 83
1
vote
2 answers

choosing the best structure of the random effects in a GLMM

I am trying to choose the best random effect structure in a GLMM, before starting with the fixed terms. To do that I include all the fixed effect and their interactions (beyond optimal model) and then I try with different combinations of the random…
Alejandra
  • 11
  • 2
1
vote
1 answer

Translating proc mixed to lmer - SAS to R

I have the following SAS code that I would like to write in R. I know the class statement is redundant in R (not necessary). proc mixed data=in_data; class G F K kal; model conc=; random G F K(F) kal(G*F*K); ods output covparms=out.cov_out; run; I…
Illya-Big
  • 41
  • 4
1
vote
1 answer

why step() returns weird results from backward elimination for full model using lmerTest

I am confused that why the results from processing step(model) in lmerTest are abnormal. m0 <- lmer(seed ~ connection*age + (1|unit), data = test) step(m0) note: Both "connection" and "age" have been set as.factor() Random effects: Chi.sq…
Elton
  • 13
  • 3
1
vote
0 answers

Testing significance of interaction between fixed and random effect in R. Correct syntax ??

I am working on a mixed model using lmer in R and I am a bit stuck on some coding. I have measured male and female fitness in Drosophila from 35 inbred lines (genotype) over three blocks. My response variable is 'fitness' with n=10…
eoin.duff
  • 37
  • 2
  • 8
1
vote
1 answer

Error: could not find function "lmer"

I'm running RStudio Version 0.98.1062 on Mac OS X 10_9_5. I loaded the Packages "lattice" and "nlme", and didn't get an error message. I read in some data and used some simple functions. But when I try to use lmer, I get the error: "could not find…
carmel
  • 31
  • 1
  • 3
1
vote
0 answers

How to predict values by using a model developed by linear mixed modelling with nesting effect?

I have a model developed by using 5 variables in R. Linear mixed modelling method is selected to develop a model with nesting effect. My R code for the model development is below: model1 <- lmer(Reduction.factor ~ (1|PAI:Open.wind) + …
Kangmin
  • 53
  • 1
  • 6
1
vote
0 answers

Multiple correlated random non-nested intercepts in R

I am trying to estimate a longitudinal model in R in which there are several random intercepts that are correlated with each other, and the data are non-nested. For example, consider a simple longitudinal model in which student test scores are…
user1189728
  • 157
  • 1
  • 4
  • 8
1
vote
1 answer

lmerTest package install failing on Ubuntu 12.04

I'm running Ubuntu 12.04.5 LTS precise 32-bit and trying to install the lmerTest package for R version 2.14.1. When I try to install from the CRAN repository or R-forge: install.packages("lmerTest") or install.packages("lmerTest",…
1
vote
2 answers

Problems running lmer after upgrading to R 3.1.1

I'm running Windows XP, and I recently upgraded to R 3.1.1 and updated all the packages. Oddly, I can't run a lmer on my own data any more. My code worked when I was using R 2.15. I also tried using the sleepstudy dataset in the lme4 package, and…
Novem
  • 11
  • 3
1
vote
1 answer

Error runnning parametric bootstrap (PBmodcomp) on lmer objects

I am trying perform a model comparision of two lmer models using the function PBmodcomp from the pbkrtest package. However I get the following error. Error in `[<-.data.frame`(`*tmp*`, , rcol, value = c(0.318337014579985, : replacement has 4080…
Andrews
  • 325
  • 3
  • 13
1
vote
1 answer

fitting LMEMs with no correlation between intercept and slope

For a simulation study, I contrast the power of different LMEMs for repeated measures. I want to specify a model in which random intercept and slope are allowed to correlate and one in which it is not allowed. But, when I compare both models, it…
beginneR
  • 3,207
  • 5
  • 30
  • 52
1
vote
1 answer

How to extract "fixed effect design matrix" from glmer model object

The call mF@X should return fixed effect design matrix (necessary for marginal and conditional R^2 in glmm). However it does not work. Is even such matrix listed in model structure? I appreciate any suggestions. str(mF) Formal class 'glmerMod'…
Ladislav Naďo
  • 822
  • 12
  • 27