lmer (& siblings glmer & nlmer) are functions in the R package lme4 that fit mixed effects models (ie, models that include fixed & random effects). These models can be non-linear in the sense that the dependent variable is transformed by a non-linear function (eg, logistic or log) to accommodate ...

learn more… | top users | synonyms

3
votes
1answer
22 views

R lmer confint: theta values not the same as summary values

I've been using lmer's confint procedure to compute bootstrapped confidence intervals for random effects. I noticed that extracting the theta values using "getME" produces estimates that are slightly ...
1
vote
0answers
9 views

Non normality and nonlinearity in a generalized mixed model

My thesis is about the encroachment in Arctic regions. My experiment contained 6 plots, of each type (encroached and non-encroached) on three elevations. Elevation and type are fixed factors, plot is ...
1
vote
0answers
17 views

Specification of partially crossed longitudinal subjects in linear mixed effects model (lme4, lmer)

I am familiar with linear regression models, but I am in the process of learning about linear mixed effects models. My data consists of measurements for each month for a set of subjects over a long ...
2
votes
1answer
27 views

split-split plot design with unbalanced repeated measures in lme4 or nlme (SAS translation)

I am sorry if this answer has been answered before but most answers here (e.g. here, or here ) do not really adress my issue (or maybe I just do not see correctly how they do. I want to use a (linear) ...
0
votes
0answers
32 views

replication of findings in regression models

Let's say we have a dataset for which we constructed a multiple linear regression model and obtained a particular set of $\beta$ coefficients and their significance values. Now, we want to replicate ...
0
votes
0answers
9 views

interpretation of deviation coded data

How do I interpret the following result of a deviation coded dataset? As far as I understand, Cog are more accurate than NonCog irrespective of the language of the word (Code_IS_Langauge: 2 levels) or ...
1
vote
0answers
46 views

lmer, glmer, and r squared

Seems like I got really confused, so here I am... I'm trying to fit lmer model with a quite simple dataset - Observation.count as a dependent variable - count of observations for a student within ...
2
votes
1answer
57 views

Nested mixed effects with lme4

I am trying to analyze data from an experiment using lme4. In the experiment, subjects saw either dark or bright versions of 50 stimuli (between-subjects; fixed effect "brightness"). All subjects saw ...
0
votes
0answers
19 views

Interpreting output with deviation (sum)coding

How do I interpret main and interaction effects with deviation coding? This is the output I generated for Code_IS_Condition (3 levels), ...
0
votes
0answers
19 views

How to model a 2x2x2 within-subjects glmer with dichotomous dependent variable

I have a 2x2x2x2 within-subjects design with a dichotomous dependent variable. So far I've modeled this as follows: mod0=glmer(DV ~ fact1 * fact2 * fact3 * fact4+(1|subject), family="binomial", ...
1
vote
0answers
16 views

Using lmer for my data?

I´ve been using two-way repeated measurement anova for some time, but recently I started learning about linear mixed effect models. So I´m definitely a novice! Here´s my project outline (see the data ...
1
vote
0answers
37 views

Split Plot Design? lmer analysis

I need advice regarding the analysis of a project that I am working at the moment. Here the picture of the experiment: We have an RCBD with four blocks. Within each block there are 5 plots. Each plot ...
0
votes
0answers
17 views

lmer: How to determine the weights?

I want to do a meta-analysis with lme4, where for each study several values $(x_1,y_1),(x_2,y_2),...$ are reported. These values have a linear relationship, so I want to use a mixed model with study ...
6
votes
1answer
151 views

Prediction interval for lmer() mixed effects model in R

I want to get a prediction interval around a prediction from a lmer() model. I have found some discussion about this: ...
1
vote
1answer
25 views

Crossed & nested random effects in lmer

I'm trying to get the specification correct for a crossed and nested effect model. Suppose I want to cross Sample & ...
0
votes
0answers
13 views

Intra-individual covariance matrix in lme4

I wonder, why do not need to specify the structure of the variance covariance matrix and the lmer function library lme4, since using the lm function library nlme this is possible. Thank you.
0
votes
1answer
30 views

Mixed model adjusted for lme4

I am trying to fit a mixed model using the library lme4, and is emerging the following error. fixed-effect model matrix is rank deficient so dropping 10 columns / coefficients. In this case, I'm ...
1
vote
1answer
63 views

Mixed models: wrong random intercepts and interpretation issues

I have a dataset of individuals that participated in several races, but not all individuals did every race. Of every individual I have their average speed. My goal is to have a measure of how ...
2
votes
2answers
49 views

getting degrees of freedom from lmer

I've fit an lmer model with the following (albeit made up output): ...
0
votes
0answers
35 views

Linear mixed model with two correlated dependent variables

I'm using the swissmunicipalities dataset in the package sampling of R. I consider two correlated dependent variables, the population between 40 and 65 (Pop4065), and the population aged 65 or more ...
0
votes
2answers
82 views

When the dependent variable and random effects 'overlap' in mixed effects models

I have added a new example here for clarity, see original question below Eg. I have 10 schools in 5 countries, ten students from each school is sampled. Prediction variables: student test marks for ...
0
votes
0answers
33 views

Fitting a model

I have a problem with fitting a model in lmer. My DV is reaction time to picture naming which is a continuous variable. I have three IV which are categorical. The first factor is TMS condition: either ...
0
votes
1answer
56 views

Post-hoc testing in multcomp::glht for mixed-effects models (lme4) with interactions

I am new to CrossValidated, so if there is a better way for me to format or ask my question, please feel free to comment. I am performing post-hoc tests on a linear mixed-effects model in R (package ...
0
votes
0answers
17 views

Degrees of Freedom of Cross-Level Interactions Terms in LME/LMER models

I am currently working on a hierarchical linear model using a dataset with variables on two levels. Level 1 variables have roughly 90000 observations and level 2 variables 141 observations. ...
0
votes
0answers
13 views

Correlated subjects in linear mixed model

I have a continuous variable that I want to model using linear mixed model. Goal is to measure two effects related to city and data source from which the variable came. The target variable is in fact ...
0
votes
1answer
55 views

How to translate percentage decline into a regression slope?

I want to model a negative relationship of count/binary data over 10 years with a known value for the decline rate (in percentage). However, I have problems in calculating the correct slope value for ...
1
vote
0answers
50 views

Use lmer to test main effects and interaction

I have to solve a problem using a linear mixed model (lmer). Six subjects performed two tests, (test1, ...
0
votes
1answer
41 views

lmer syntax for a two-way model with one fixed and one random factor [closed]

Please could anyone tell me if my R code is correct? I have a two-way model with one fixed factor, habitat, and one random factor, site. The code I am using is: ...
0
votes
0answers
14 views

Multilevel model with multiple level 2 variables

I am estimating a model where I want to know how the performance will vary across the students as influenced by their individual characteristics and aspects of their schools. Performance is the ...
3
votes
1answer
49 views

Hypothesis testing: If not a p-value in mixed effect models, then what?

I've been working on a messy, repeated measures data set of endocrine data looking at a small group of variables (after eliminating several uninteresting contenders in exploratory data analysis), each ...
0
votes
1answer
101 views

Model averaging predictions from lmer models

I am trying to model average predictions (not betas) and estimate confidence intervals from linear mixed models run with lme4::lmer. I have experimented with functions in the MuMIn and AICcmodavg ...
1
vote
0answers
34 views

What does (1|g1/g2) mean in a lmer formula?

What does this formula mean? lmer(y ~ (1|g1/g2)) equivalently: lmer(y ~ (1|g1) + (1|g1:g2) According to the PDF that I ...
1
vote
1answer
141 views

Correct glmer distribution family and link for a continuous zero-inflated data set

Data set details: Zeros are "real" (volume) Data set is heavily left skewed (even when zeros are excluded) Response is continuous (volume) Can anyone recommend a distribution family and link that I ...
1
vote
0answers
69 views

Comparing mixed-effects and fixed-effects models

Given three variables, y and x, which are positive continuous, and z, which is categorical, ...
0
votes
0answers
81 views

Error when using mixed function in afex package on GLMM

I have been using lme4 in order to fit an overdispersion model and GLMM to my data as shown below. This seems to work fine. ...
1
vote
0answers
16 views

How to include questionnaire data with behavioral counts in lmer() maximal logistic regression model?

I’m using a maximal logistic regression model to analyze some data. I would like to keep using this technique if possible, just include more data in the model. The main data I’m looking at is counts ...
4
votes
0answers
128 views

R lmerTest and Tests of Multiple Random Effects

I'm curious about how lmerTest package in R, specifically the "rand" function, handles tests of random effects. Consider the example from the lmerTest pdf on CRAN that uses the built in "carrots" ...
3
votes
1answer
81 views

lme4: random effects

I have a simulated data set of 4 repeated measurements (measure) for 5 subjects (subj), 20 trials (trl) each. I am trying to fit a model with random slopes for age category with subject and trials ...
0
votes
1answer
36 views

Material difference between Mixed Effects Model and normal Linear Model

I have a question about normal linear models vs mixed models. Say I'm predicting prices for certain products, and I know two things: store and brand: In a linear model (lm), this would be: ...
0
votes
1answer
50 views

Two factor linear mixed effect model with multiple slopes (lmer)

I have data with two factors TREATMENT and TIME both with two levels and a dependent variable RATIO. Besides random intercept for subjects, I want to specify random slopes for both of the independent ...
0
votes
0answers
43 views

plot lmer confidence intervals

I have a mixed model fitted with lmer4 [ModelSub = CA ~ P + T + S + (1|Study)] which yields the following estimates - ...
1
vote
1answer
33 views

Random variable in mixed-effect model (ecological studie)

I'm beginner with the mixed-effects model, so I already apologize if my question is a bit naive. My problem is the following : I sample each time 30 plants in 6 populations on 9 mountains. So I ...
1
vote
1answer
87 views

Addressing “NOTE: Results may be misleading due to involvement in interactions” warning with Tukey post-hoc comparisons in lsmeans R package

Background: I am using linear mixed-effects models (LMMs) in order to determine how the interaction between two fixed effects influences measures of a response variable. Since I am working with a ...
0
votes
0answers
50 views

scale() function and standardized values for fixed effects

I'm currently using the scale() function in a glmer model (see below) and I'm having some inconsistencies between my ...
1
vote
0answers
92 views

Testing and correctly interpreting the significance of nested random effects

I'm building a series of relatively simple random effects models where we repeatedly measure a water quality variable, say conductivity (cond), in different watersheds (ws) and streams (st). Here, ...
1
vote
0answers
49 views

What is a case where including random correlation parameters decreases the error on the fixed effects?

I'm wondering about the effect of true correlations among random effects on the standard error of my fixed effects in lme4::lmer models in R. My assumption is ...
2
votes
1answer
489 views

Obtaining adjusted (predicted) proportions with lme4 - using the glmer-function

I aim to estimate the annual proportion of patients (% of patients) that are smokers in a population whose age and sex must be taken into account. In other words, I want to calculate the adjusted ...
2
votes
1answer
55 views

Why are the beta values provided in lmer() different than simple group means of observations?

In a 2-level mixed-effect model, the equation for level-1 is $$Y_{ij} = \beta_{0j} + r_{ij}$$ where $\beta_{0j}$ is the mean outcome for the $j$-th group. I ran the following model: ...
1
vote
0answers
48 views

lme4 (v1.7) fails at fitting an “animal model” (LMM) compare to rrBLUP

I would like to fit a basic "animal model" (a kind of linear mixed model, see below) using the latest version of lme4 on CRAN (v1.7). To check the results, I am fitting it on simulated data, and ...
0
votes
1answer
89 views

Mixed effects model rank deficiency

I'm looking at the impact of dietary treatment and sex on weight. My dataset comprises weight data for 3 dietary treatments and sex (male and female). The experimental design was run in duplicate, do ...