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

0
votes
0answers
6 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
8 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
18 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
73 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
43 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
40 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
0answers
102 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
69 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
105 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
66 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
37 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
87 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
37 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
134 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
138 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
69 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: ...
2
votes
3answers
929 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
174 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
122 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
61 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
55 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
59 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
458 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
88 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
125 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 ...
0
votes
0answers
62 views

Data in one condition significantly different from data in other conditions tested on the same population?

I have a series of experiments where I have tested the reaction times (RT) of a series of participants under different conditions. That's 7 participants in 5 conditions, with 32 repeats per ...
1
vote
1answer
71 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
40 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
97 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
205 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
176 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
99 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
168 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
479 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
104 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
60 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
59 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
574 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 ...
2
votes
0answers
139 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
102 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
195 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
377 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
98 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
375 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
164 views

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

I am using three categorical predictor variables X1, X2, X3 and one continuous dependent variable Y, and I want to treat X3 as a random effect. The simplest model I could come with: ...
0
votes
1answer
2k 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, ...
2
votes
0answers
312 views

Comparing correlations between two groups

I have some data from two groups of subjects. Within each group, the correlation is calculated on some biological measures between any pair of two subjects. In other words, a group of $N$ subjects ...
3
votes
0answers
116 views

Mixed-effect modeling with paired observations & bounded response variables

I am quite new in the field of mixed-effect modeling. For a beginner like me, I guess I combine several levels of complication in my analysis: paired observations & bounded response variables. I ...
4
votes
1answer
128 views

Interpreta​tion of main effect when interactio​n term is significan​t (ex. lme)

As an example I use Pinheiro, J. C. & Bates, D. M. 2000. Mixed-effects models in S and S-PLUS. Springer, New York. page 225. Rats whose body mass has been measured are fed by 3 different diets ...
0
votes
0answers
594 views

Nested random effects in lme

I have a data which is longitudinal. I have same subject reading at 3 different treatment one after the other and I ran the samples in 2 batches: Batch one has subject id 1:7 and the three time ...