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

lme() with several within and between (categorical and continuous) subject factors

I am currently trying to analyse data from an experiment of mine and I have done some searching for instructions on the usage of the lme() function for R, since I am looking to analyse my data with a ...
1
vote
0answers
21 views

Estimated random effects correlation of 1 when fitting a random intercept model using lme

I am trying to fit the linear random effects model: $y_{ijk}=\theta_{ij}+\epsilon_{ijk},$ where $\theta_{ij}$ is a random effect. I assume the random effects and error distributions are normal. ...
0
votes
0answers
8 views

How to calculate confidence intervals using gamm?

I have a problem calculating confidence intervals from a gamm model. My data looks like this: As you can see, these are longitudinal data of subjects in groups (Each subject appears only in one ...
0
votes
0answers
27 views

Random effect model result of R and JMP

I have two groups of people, namely A and B. We have the hourly mean heart rate for 45-80 hrs, length differed by individual. We are interested in the group*time effect on the heart rate. Since I have ...
1
vote
0answers
62 views

including interactions in a mixed linear model in R (lme)

I'm trying to test for the effect of soil moisture on transpiration rates. I have plot-level data for 18 plots in 6 different stands of trees (3 plots x 6 stands). I want to treat "stand" as a random ...
0
votes
0answers
40 views

Intuitive feel in mixed effect models

This is something I have been thinking about for sometime. Consider the random effects model $y= Zu + e$ where $u \sim N(0, \sigma^{2}I)$ and $ e \sim N(0, \epsilon^{2}I)$ I now want to compare 2 ...
1
vote
1answer
81 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
23 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
25 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
31 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
34 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
22 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
31 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
168 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
95 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
64 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
101 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
136 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
160 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
405 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
113 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
57 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
184 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
63 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
399 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
240 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
90 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: ...
5
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
352 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
212 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
76 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
87 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
69 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
987 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
110 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
145 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
50 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
136 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
589 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
244 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
117 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
272 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 ...
2
votes
1answer
711 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
131 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
63 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
1k 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
225 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
122 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 ...