lme() is the function for estimating Linear Mixed Effects models in the nlme package for the R project for statistical computing. For general questions about mixed effects models, use the [mixed-effect] tag.

learn more… | top users | synonyms

1
vote
0answers
29 views

Multivariate model in lme() with independent random effect, similar to MCMCglmm

I would like to specify a multivariate model with lme with a random effect for group which is independent across variables. I found this post, which explains that ...
0
votes
0answers
16 views

allowing for different variances between groups versus allowing for random slopes in lme

I have a data set that looks like this: Genotype Condition Trait A 1 0.0007 B 1 0.005 A 2 0.0003 B 2 ...
0
votes
0answers
23 views

differences between different notations in mixed effects model

I have never been so confused in my life. Could anyone please tell me what is the difference between the following mixed effects models: ...
0
votes
0answers
25 views

Choose random structure in LME. Should I rely on AIC?

I want to choose the best random structure for my mixed-effects model. I have compared four models: without a random part, random intercept, random intercept and slope, and random effects: ...
1
vote
0answers
30 views

What is the equivalent of a repeated ANOVA using a mixed effect model with lme?

I have a data frame with this structure: ...
0
votes
0answers
21 views

Trial with two sites, two years - lme model building and simplification (Q2)

I have got two questions on an agricultural field trial that was conducted at two sites in two conscutive years. Virtually everything was the same in all trials (variety, spacing, planting ...
0
votes
0answers
26 views

Trial with two sites, two years - Different number blocks - Problem? (Q1)

I have got two questions on an agricultural field trial that was conducted at two sites in two conscutive years. Virtually everything was the same in all trials (crop variety, planting density...). ...
1
vote
0answers
104 views

lme / lmer - split-plot with Non orthogonal subdesign

I have an agricultural field experiment (testing a plant protection agent): Split plot design with: ...
3
votes
3answers
90 views

Which test for this data set of chemical concentrations

I have a very simple data set: a parameter (concentration of a chemical) was measured at day 0, day 1 and day 2 in three subjects (there is a control group as well, but here all the values are always ...
0
votes
1answer
56 views

Good way to plot a variable between conditions with multiple measurements

I've a frame containing Participant----Condition----Duration Participant1,One,2000 Participant1,One,2780 Participant1,One,200 Participant2,Two,2000 Participant2,Two,2340 ...
1
vote
0answers
80 views

Fixed, random effect and nested factor in lme

I have a dataset with the following variables: Treatment : (fixed,3 levels) Location : (fixed, 4 levels) Sample (random, 5 levels): 5 samples are taken in each location (randomly) Subsample ...
5
votes
1answer
120 views

Demonstrate difference in growth over time

Short version Is there a difference per treatment given time and this dataset? Or if the difference we're trying to demonstrate is important, what's the best method we have for teasing this out? ...
4
votes
1answer
125 views

Using lme with a fixed beta (slope), and estimating the intercept only

lme.1.combo <- lme(ComboRate ~ p_w, random = ~1 | Rat,data=x) The line above will return a fitted intercept term, and a fitted beta (slope) term given these ...
2
votes
1answer
287 views

Dropping term for correlation between random effects in lme and interpretting summary output

I want to fit a model without a correlation term between the random effects with lme. In lmer this is fairly straighforward.... ...
1
vote
1answer
93 views

Linear Mixed Model Interpretation

I'm working on analyzing some data that need to use lme model, but I'm not sure about interpreting the output. Data looks like this: ...
1
vote
0answers
48 views

Translating from aov to lmer or lme with three levels of nesting

I have data from a split-plot (or repeated measure) experiment with three factors: A is random, B is fixed and nested within A, and C is fixed and nested within B. I can test for the effect of B, C ...
1
vote
0answers
148 views

Non-converging heteroscedastic linear mixed-effects model (R lme)

I'm working on a project where I try to determine the influence of consulting expenditures companies made the year before on several economic figures. My dataset consists of roughly 2'000 different ...
1
vote
0answers
55 views

Mixed-model specification in R - exploring individual differences

My current experiment aims to explore the effect of viewing condition, difficulty and depth perception on object grasping. I'm mostly interested in the effect of individual differences in depth ...
0
votes
1answer
277 views

Specifying contrasts for lme in 3x3 repeated-measures design

I would like to test the effects of two categorical variables, each with 3 levels, on some continuous data. Three groups of participants completed the same task for 3 types of stimuli, so it's a 3x3 ...
0
votes
1answer
197 views

Checking assumptions LMM: residual plot with diamond shape

I am running a linear mixed model and want to check its assumptions. The model I run is comparing if males and females behave differently over time (timeclass=1,2,3,4): ...
1
vote
1answer
83 views

Determine individual consistency from mixed model?

To investigate the difference between three tasks I tested 30 individuals on each of the three tasks and ran the linear model as follows: ...
4
votes
3answers
2k views

Checking assumptions lmer/lme mixed models in R

I ran a repeated design whereby I tested 30 males and 30 females across three different tasks. I want to understand how the behaviour of males and females is different and how that depends on the ...
3
votes
1answer
281 views

How to specify partially crossed random effect in lme?

I am new to R and would like your help with lme formula for partially crossed random effect in a random-intercept, random-slope model. In the longitudinal data I have, each subject (barring some ...
0
votes
0answers
180 views

Leave-one-subject-out cross validation for mixed effects models

I am doing a leave-one-subject-out for a mixed-effects model for a longitudinal data analysis, in which the model is fitted to all subjects minus one at a time, and the left-out subject becomes ...
0
votes
0answers
70 views

Linear model or component analysis on timecourse data

I have some timecourse data which plotted looks like the figure below. I want to better describe the difference between the two conditions. My adviser advised :D me to use a linear model and observe ...
1
vote
1answer
73 views

What's the value of ANOVA/LME?

I have some data I want to analyze, for which I was curious whether one or more conditions lead to measurements significantly different from the rest. I started out by making a table of t-test ...
1
vote
0answers
68 views

Using REML in mixed models if random factor is small

I'm trying to fit linear mixed models to 3 different DV (so three models). I understand that REML gives less biased variance estimates. As im more interested in the fixed effects, I use ML for the ...
1
vote
0answers
757 views

Nested random effects group size using lme (in nlme)

I'm wrestling with a question regarding random effects that I haven't been able to figure out with my regular resources. I am examining the effects of two treatments (heat and water) on plant biomass ...
0
votes
0answers
100 views

How to do linear mixed effects modeling with this data?

Study Design: Below is a clinical trial in a longitudinal dataset. All subjects (n=34) attended V1 (baseline) and then they were assigned to either a ...
4
votes
1answer
140 views

GLMM model specification help gender effects + an effect that is nested only within female

Main question: "What are the contributing variates to daily movement distances?" Specifically my question today relates to: "What is the contribution related to gender, and then within female what ...
1
vote
1answer
74 views

Translating R lme comand to mathematical equation

I would appreciate if someone could help me in translating the following R command into a mathematical equation: ...
0
votes
0answers
49 views

Using R - lme() with Log dataset

this is a question regarding using lme() in R to calculate between-group and within-group variation in a dataset containing log values. I have read that when using lme() to calculate sigma ...
1
vote
1answer
124 views

How to fit different ARMA models by group in R?

I have $Y$ measurements per several Subjects and I'm studying impact of factor on $Y$ measurements. I've fit a lognormal mixed model with a random interaction, but I'm finding autoregressive ...
0
votes
2answers
382 views

Interpretation of interaction effects in linear mixed models with numeric and factorial IVs

I hope my question is not too basic for this community. I can*t figure out how to interpret the output of my linear mixed model, especially the interaction effects. I do my analysis in R using lme ...
3
votes
0answers
205 views

Adjusted / marginal means estimation in linear mixed effect model in R / Stata

I am a new R user, having some difficulties validating/replicating results from Stata (which a colleague uses) in R. We are investigating the time (...
3
votes
0answers
111 views

Plotting fit for binomial lme

I've been asked by a reviewer on a manuscript to provide plots of a model fit for a binomial lme which is specified as follows: ...
0
votes
1answer
229 views

Representing repeated measurements within sample plots in linear mixed effects model in R

I have collected data on gas fluxes from plots of soil subjected to 5 different treatments ("D2", "K2", "M", "N", and "O2"), which also possessed variable clay contents. The experiment was laid out ...
1
vote
1answer
610 views

lme: random effects for replicated growth curves

I am measuring the evolution of the brain response to a visual stimulation over time. The measures are done every seconds from 1 second to 14 seconds (each measure at time t gives a value summarizing ...
2
votes
0answers
119 views

lme() - returns incorrect Residual (within group) variance

I tried to use lme() to get intercept and residual variance values using a very simple dataset with just 2 values x and y. There ...
1
vote
0answers
62 views

Help on expressing a model

I am a complete newbie in statistical modeling and I never got the opportunity to learn how to express a model in algebraic form and its respective matrix notation. I know how to define models in R ...
4
votes
1answer
60 views

LME Relevelling Issue

I'm in the process of relevelling some factors for an LME using R and have hit an issue. I've reordered the factor levels to enable me to talk about the outcome of the model more easily in relation to ...
9
votes
1answer
843 views

lme and lmer comparison

I was wondering if anyone could enlighten me on the current differences between these two functions. I found the following question: How to choose nlme or lme4 R library for mixed effects models?, but ...
3
votes
0answers
186 views

Correctly specifying temporal pseudo-replication in a mixed effects model in R/nlme

I would like to correctly specify that my data is temporally pseudo replicated in a mixed effects model in R using lme() of the ...
1
vote
0answers
115 views

Lagged term in time series with stationary errors: too good to be true?

I often have datasets where there are many animals, in several treatment groups, and each animal's body weight is measured at regular intervals over the course of its lifetime. The response of body ...
7
votes
1answer
228 views

Intraclass correlation in the context of linear mixed-effects model

Suppose that one investigates the two sources of variability with data $y_{ij}$ acquired from $j$th subject under $i$th session ($i=1,2; j=1,2..., n$). A linear mixed-effects model can be formulated ...
2
votes
1answer
479 views

ezAnova vs. lme for factorial repeated-measures design: results differ, why?

I have used lme and ezAnova to analyse data from a 2$\times$3 repeated-measures experiment. Theoretically those are two ...
5
votes
1answer
110 views

Accounting for pretreatment differences (linear mixed effects model) using R/nlme

I have an experiment that is as follows: 4 years of data (1 year pre-treatment, 3 years during treatment) 20 plots total 5 plots of each type (Control, Treatment A, Treatment B, Treatment A+B) Each ...
1
vote
0answers
694 views

Error Message in lme() :Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1

I have a dataframe called "cleaned", which consists of about 300,000 rows and 13 variables. Except the dependent variable, all variables are categorical and have multiple levels ($\geq2$). The ...
1
vote
0answers
189 views

Selection of lme models using AIC & appropriate random effects & variance structure

I am using three categorical predictor variables $X_1$, $X_2$, $X_3$ and one continuous dependent variable $Y$, and I want to treat $X_3$ as a random effect. The simplest model I could come with: ...
0
votes
1answer
3k views

Specifying multiple (separate) random effects in lme

I was working in R packages nlme and lme4, trying to specify the models with multiple random effects. I found, that only nlme allows to specify the heterogeneous structure of the variance. Therefore, ...