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
16 views

Not complete repeated measurement for linear mixed effect model in R using na.omit

I have measured the effect of different stimulation types in a group of subjects and I am using linear mixed effect models in R to check the effect of each stimulation type. Let's say I have ...
0
votes
0answers
18 views

An improvised method to model heteroscedasticity in a mixed regression model

Here is a description of my experimental design: Randomized complete block design with 4 blocks/replications and a split-plot factorial design. I have the following treatments: 2 ...
0
votes
0answers
21 views

Unequal variance and crossed random effects in linear mixed effects model

I'm analyzing an experiment that has 50 subjects and 50 items. Each item can occur in two possible conditions. Every experimental subject produces a (continuous) response to every item, but only once ...
0
votes
0answers
15 views

Two way ANOVA with repeated measure v.s. Linear Mixed Model (in R)

The study design is like following, there are in total 8 subjects (A - H). A-D are female and E-H are male (gender). A-H all do exercises. We measure ...
0
votes
0answers
38 views

Autocorrelation lme R

I am seeking advice on how to effectively eliminate autocorrelation from a linear mixed model. My experimental design and explanation of fixed and random factors can be found here from an earlier ...
0
votes
0answers
19 views

Post-hoc tests after within-between Two-Way ANOVA

I'm new here! I have run an experiment with two groups randomized to different experimental conditions (A and B), where an outcome parameter was measured at four time points (1h,2h,3h and 4h) I ran ...
2
votes
1answer
37 views

Comparing fit of a Mixed Model to a Fixed Model

I would like to be able to compare 2 models as is often done as follows: modelA <- lm(Ys ~ X1 + X2 + X3) modelB <- lm(Ys ~ X1 + X2) anova(modelA, modelB) ...
0
votes
0answers
29 views

How to plot in r results from linear mixed effects model with significant interaction and repeated measures

I wonder which is the best way to plot in r the results from the lme function, in presence of a significant interaction. The model has two interacting fixed effects and a random effect on subjects to ...
1
vote
2answers
76 views

Standardized estimates give different p-value with a glmer/lmer

I have a large data set where I relate the response variable to multiple explanatory variables; since I have different areas I have also included a random factor. The response variable is binomial ...
1
vote
0answers
42 views

In repeated-measures linear mixed model, should the time variable be fixed or random?

I'm attempting to run a linear mixed effect model with repeated measures. I read the relevant chapters from R book to construct my model. However I’m concerned if my model syntax is correct for ...
1
vote
0answers
15 views

Syntax for crossed random effects with random slopes nlme

I'm creating a number of models with a crossed random effects structure that allows for heteroscedasticity. In my analysis I have measurements of nest elevation (Z), each associated with a parent ...
0
votes
0answers
20 views

help with lme() for nested random effects factors [duplicate]

this is a fairly basic question, but I have spent all day trying to figure it out (including reading other questions on this page), and I could really use some help. I am trying to run a simple mixed ...
1
vote
1answer
55 views

Mixed Model Analyses with Interactions in the Random Effects Structure

I'm new to mixed models, and I'm having trouble trying to figure out what the random structure should be for a specific example. I'm using a shooter bias task (the paradigm where subjects are ...
1
vote
0answers
31 views

Can a linear mixed model (LMM) be superior to a linear model (LM) in case of a single repeated measure (paired sample)?

In short and in general terms: While LMMs are often used in longitudinal studies with multiple repeated measures, I never came across an example which models a paired design. However, I also never ...
4
votes
1answer
223 views

R mixed models: lme, lmer or both? which one is relevant for my data and why?

I have a data obtained through forest inventory conducted yearly (1994-2015) in a West African country. 10 plots of equal sizes (1 ha each) were selected from unmanaged natural forest and then ...
0
votes
0answers
35 views

R repeated measures: lme specification for multiple replicates per subject and time point

I have a repeated measures problem where my dataset has multiple replicates per per subject per time point. The number of repicates varies per subject. My objective is to use a mixed model to measure ...
0
votes
0answers
31 views

Help with linear mixed model with nested factor

I would appreciate some assistance with setting the statistical analyses of my experiment with fish. The experiment was the following: Fish larvae of approximately the same weight from four different ...
0
votes
0answers
40 views

NLME loop over big dataset and multiple phenotypes

I am running a linear mixed effects model (nlme) and I would like to run the model over 1000 columns (x: independent variable e.g. x1…x1000) and I would also like to run this for a number of depended ...
0
votes
0answers
22 views

How to use the likelihood ratio test when I use dummy variable in lme model

I have a question about how to use the likelihood ratio test with dummy variables in lme model. I have six levels of nutrient treatment in my experiment, one is low, five are high. For the five high ...
0
votes
0answers
35 views

Replicating or Approximating SPSS syntax for a longitudinal mixed model example in R

Could someone show how the following SPSS syntax for a longitudinal mixed model specification could be replicated (or approximated) in R? My dataset is "mydata." ...
0
votes
0answers
31 views

R: Repeated statement alternative in lme or lmer

I'm hoping to determine the effects of time in months, call type, facility location of a call center agent, caller region and language preference on the mean call engage time of new-hire call center ...
0
votes
0answers
65 views

Creating a mixed model for repeated measure using lme function

I have a question about a selection of the most proper model and subsequent ANOVA for my experimental data. I have one response variable - Net assimilation (Anet). Then I have 5 categorical variables ...
0
votes
0answers
14 views

Growth in lme nonnested factors

In an experiment, subjects have been assigned to groups and groups have been assigned to experimental conditions (one factor with two levels). The subjects have been measured on a variable 4 times ...
2
votes
1answer
57 views

Repeated measures anova or linear mixed model?

I have behavioural observation data on subjects (individuals) on which I did two kinds of tests. One test measured subjects' latency to feed and the second test measured their aggressive interactions. ...
0
votes
0answers
24 views

R for lme complicated study design

I have a data set where siblings (brothers and sisters) had the quantity of a specific bacteria measured at specific intervals since their birth (2 weeks, 1 month, 2 months, 6 months, 1 year). Because ...
0
votes
0answers
24 views

Multilevel model to analyze limb injury data in Elite Athletes

I have a dataset of muscle activity measurements (variable name = RMS.mean) from a control group and an ACL injured group of elite ski racers. There are 11 ACL subjects and 12 controls. These ...
0
votes
0answers
28 views

How can I check for collinearity and heteroskedasticity in mixed models with lme (package nlme)?

How can I check for collinearity and heteroscedasticity in lme (R package nlme)? I found a blogpost that provides functions to do so for package lme4, but not for nlme. Here's a minimal example ...
0
votes
0answers
17 views

Time varying covariate in within-subject factor

A researcher will collect data of dependent variable Y (from 100 subjects). Variable Y is continuous and reflects consumption measured in grams. The dependent variable is measured at three occurrences ...
0
votes
0answers
48 views

LMM: Model-comparison and evaluation

My problem is that the residuals of two models (that differ significantly) are not different, which confuses me. If two models are different, then surely we can expect the residuals from one of the ...
0
votes
1answer
53 views

Model selection in mixed-effects model with collinearity trouble

In a model aimed to assess the influence of land use measures on ecosystem functioning, I have one log-transformed dependent variable (the ecosystem function), and 5 fixed-effects independent ...
0
votes
0answers
29 views

Mixed effects model, pseudoreplication in space, change through time

I have not found a good example for data with my structure. The data come from a long-term observational study. The response variable is growth rate, with one measurement from an individual fish. ...
0
votes
0answers
389 views

R- Which is the best way of reporting results of lme() in two different possible cases?

When searching for correlations between between a dependent variable and a factor or a combination of factors in a repeated measure design with lme() I noticed that I can encounter two types of ...
0
votes
1answer
58 views

Multilevel analysis or separate analysis for each level - group / individual analysis

I collected muscle activity levels from 4 different leg muscles on each lower limb over a 20 jump test in 2 groups of athletes. One group has ACL injury (n=11) and there is a control group (n=11). ...
1
vote
0answers
246 views

How can I extract a residual variance-covariance matrix in lme?

I have been using MCMCglmm in R to fit bivariate (two response traits) mixed models in R, but now I need to move to lme to account for temporal autocorrelation of the residuals. In MCMCglmm I can fit ...
1
vote
1answer
71 views

Mixed Effects model with block and autocorrelated fixed effect

I am trying to run a mixed effect model on soils data that were collected at two locations in a randomized complete block design (4 blocks). I am interested in the effect of location and depth (below ...
0
votes
0answers
95 views

corARMA specification in a date*DayNight model

I'm working on a model of animal movement speed as a function of date and day/night. For each animal (50 individuals), I have 2 values for each date an animal was present - a day value and a night ...
0
votes
0answers
24 views

Different results in a mixed model when compared with raw data

I ran a model with reaction time as my DV and PWI Condition (2 levels) as one of the fixed factors. I used contr.sum for all fixed factors. I ran the following model to look for differences in ...
5
votes
1answer
162 views

Mixed effects - how to model random scaling of observations?

I'm analyzing a three-way mixed linear model using lmer: Y ~ Factor1 * Factor2 * Factor3 + (1|sensor) However, different sensors have different gains, uniformly ...
1
vote
1answer
63 views

Which model of lm/lme to believe?

I have a data set of height values for several individuals of several species in 2 different conditions. Not all the species are found in the 2 conditions. I want to compare height values between ...
2
votes
1answer
243 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
52 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 ...
1
vote
2answers
63 views

Can we use weights in lme as a covariable?

This question might be a duplicate, but a colleague and I have trouble understanding previous answers about the use of weights in lme. So in simple terms: We have an experimental design with 2 ...
0
votes
0answers
15 views

unequal item numbers

I am looking at whether reaction time scores for picture naming (DV) is influenced by age (younger vs older adults), word type (cognates vs. non-cognates) and language (English vs. French). However, I ...
0
votes
0answers
37 views

LME, t-test and glht

I am doing some light simulations, but came across the following problem. I cannot obtain the same p-value as a paired t-test as it does for multiple comparison and LME. ...
0
votes
0answers
74 views

Concerns regarding correlation structures and random variance using lme

I’m modeling some variables repeatedly measured over a three months period for a total of 300 individuals. These variables (e.g. activity) were measured at three different time scales: daily (90 ...
0
votes
0answers
43 views

I keep getting the error “iteration limit reached” when using LME

I'm trying to model the effect of island size and island isolation on species richness using a LME. However I'm getting this error message "iteration limit reached". ...
0
votes
0answers
53 views

Linear mixed-effect models for variables with unequal size

as a biologist I am currently analyzing data where variable sizes are unequal but nevertheless dependent on each other. In my specific case, I am aiming to test with a linear mixed-effect model ...
0
votes
0answers
105 views

Should I include weights in LME?

I have two case studies where I am looking at the influence of a trait (trait A) on mortality (m) of trees and seedlings. Following your comments on ...
1
vote
0answers
70 views

Piecewise HLM with nlme [closed]

I have two time periods of interest and four observation points(0 months, 4 months, 12 months, 16 months) for my subjects. The first time period of interest is between observation 1 and observation 3. ...