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
40 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
33 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
7 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
26 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
15 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
4 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
34 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
23 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
44 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
26 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
39 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
66 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
22 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
25 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
63 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
24 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
78 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
34 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
41 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
41 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
91 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
61 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
78 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
38 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
337 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
38 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
31 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
38 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
38 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
72 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
69 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
35 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
19 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
55 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
60 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
41 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. ...
1
vote
0answers
617 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
77 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
328 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
92 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 ...