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

aov() and lme() give completely different results in analyzing repeated measures

I have data consisting of two measures per subject (variable score, measured at Day 0, and Day1 per each subject). There are two groups, and each subject belongs to one of them (variable Group). I ...
0
votes
1answer
43 views

Model selection: testing the need for random-effects terms in longitudinal data

I have longitudinal data set where each participant was observed for 12 weeks. I followed this paper: Bliese, Paul D., and Robert E. Ployhart. "Growth modeling using random coefficient models: Model ...
2
votes
1answer
63 views
+50

R: default correlation in nlme::lme

I just noticed that the default correlation of nlme::lme() is NULL. The explanation of argument for correlation is correlation: ... Defaults to NULL, corresponding to no within-group ...
0
votes
1answer
27 views

lme for multiple groups comparing treatment vs control

I would like to check for differences in growth rate between groups. I have three main groups miRs and for each group I have a ...
1
vote
0answers
3 views

How to design a contrast matrix with a continuous variable

I was wondering if someone could help me designing a contrast matrix when you have a continuous variable. My model looks like this: ...
0
votes
0answers
8 views

Problem using PermTest of the pgirmess package: Different p-values when rerunning PermTest on same lme

I am analyzing data of a decision-making task using anova(lme) for a linear mixed effecs model. To check for normality, I use the Shapiro-Test on the residuals of the model. In case of a significant ...
0
votes
0answers
17 views

experimental design lme

I have a question about my experimental design and how to treat it statistically. Briefly, I am interesting in how herbicide application affects plant biomass and is it any differences between ...
1
vote
1answer
28 views

How to interpret the lme function result?

the following is the command I used and the results I got for my question, whether the visitation frequency of my bee is different in different experiment types in different locations. I used the lme ...
0
votes
0answers
48 views

Heteroscedasticity and bias shown in residual plots, lme

I have been fitting a linear mixed-effect model. The residual plots are not desirable. I have found many posts telling me the first is heteroscedastic, and the second is biased. But I can't find info ...
0
votes
0answers
39 views

nlme - 3-level-design: How to specify random factors?

I am a little bit confused about how to operationalize the random factor in a 3-level design. I think I have 3 level design. Or is this already wrong? Level 3: Time of measurement (variable name: ...
0
votes
0answers
11 views

anova versus LME

I have a very simple model and problem, but am confusing myself in model comparisons. Please help. I am running a model that is a single group pre-/post-test design. No control group. I am running an ...
0
votes
0answers
9 views

LME showing positive slope when mean and median value of measure is decreasing

I have a data set that consists of longitudinal data looking at an outcome variable at multiple evaluation points. It includes: 1 dependent variable, NetBreath (NB), a continuous variable 1 ...
0
votes
0answers
30 views

Check coding for repeated measures mixed model in lme4 and nlme in R

I have made some models in nlme and lme4 and want to check I have coded them right, because I need to account for repeated measures from each territory (one measurement in each season). I'm looking ...
0
votes
0answers
19 views

Analysing a two-way, within-subjects design with a linear mixed effects model

The topic of mixed effects modelling is new to me, so I apologise upfront if this is an obvious question. I'll frame the question in terms of traditional ANOVA, as this is what I'm more familiar ...
0
votes
0answers
5 views

differences in outputs anova and linear mixed effect model? post Hoc doesn't work

I took a linear mixed effect model to get differences in the abundance of insects in different land uses an regions. I declared "Leerung" (clearance of traps) and "Standort" (site) as random factors. ...
1
vote
1answer
19 views

lme with interaction: how to decide which treatment is more efficaceous? how to deal with p value column of the lme summary?

I am using an lme to check the effect of 3 types of treatment (A,B, C) on my variable, over time. I do not expect any effect of treatment A, which is a fake treatment. I have measurement over 5 ...
1
vote
0answers
41 views

Mixed ANOVA different results in R vs. Matlab

I´m trying to sort things out on the evaluation of the following data, as I have contradictory results in R vs. Matlab. I´m new to R and data evaluation ;-) and I hope I will provide enogh information ...
1
vote
0answers
24 views

Panel data with small N. Is it ok to use “lme”?

I have longitudinal observations from 6 individuals. For each individual, there are 29 time points when data have been collected. Can I use "lme" in R to estimate a model? Should I check for ...
0
votes
0answers
52 views

Split-Split-Plot or nested ANOVA using lme

I have a simple design but I do not know how to handle it. I have a nested anova (or a split-split-plot anova). I have three grazing treatments (Grazing, coded as Gra1, Gra2, Gra3), replicated each ...
0
votes
0answers
30 views

LME with categorical and continuous variables

I'm running an LME with R version 3.2.2 (package nlme) and I've got 2 very simple questions (I think). Info you probably won't need The study design is nested (unique b1s inside unique x1s). I have ...
1
vote
1answer
47 views

Convergence of results of nlme lme() based repeated measures ANOVA between R and InVivoStat

My aim is to run repeated measures ANOVA. I am using AR1 covariance structure to model within-subject correlations in dependent variable as AR1 covariance structure based model fits my data better ...
3
votes
0answers
80 views

The use of acf or Phi/Rho correlation coefficients to diagnose autocorrelation in lme?

I am looking for some advice on how to diagnose autocorrelation issues with when time intervals are not equally spaced? Specifically, I would like to use that diagnosing method to help choose the ...
0
votes
0answers
23 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
27 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 ...
1
vote
0answers
79 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
26 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
99 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
39 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
44 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
46 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
93 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
68 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
23 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
93 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
45 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
372 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
47 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
35 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
52 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
34 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
39 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
39 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
74 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
73 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
26 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
26 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
38 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 ...