# Tagged Questions

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.

44 views

### Using lme to perform a nested ANCOVA in r

I want to perform a nested ANCOVA using the function lme in r. My data concerns the growth rate (sgr) of fish at different temperatures (temp). In the trial there were 3 replicate tanks each housing 8 ...
7 views

### What is the difference between these mixed ANOVA specifications

I am trying to perform a mixed ANOVA analysis with one between subject and two within subject factors. Some Experiment information Two groups of 17 subjects (old and young participant group) Three ...
16 views

### Can I compare lme models with and without quadratic (polynomial) term?

I am running mixed-effects analysis using lme package in R. I am trying to understand whether a linear model or a polynomial curve would better capture the change in a variable over time. I know ...
66 views

### Using lme (or lmer) building a mixed model with repeated measures, a covariate, and multiple blocking factors (treatment and patch within treatment)

Our study is looking at annual plant Biomass (ANPP) across several sites and years. Each site has four ...
36 views

### R: lme vs ezAnova: Different degrees of freedom for two-way ANOVA with repeated measures

I'm trying to run a two-way ANOVA repeated measurement with (1) lme and (2) ezAnova. The problem is that I get different degrees of freedom of the denominator (denDF...
22 views

### Autocorrelation specification in lme )

I am modeling wood properties variation of several individual within the same tree species using multilevel lme(). I specified a first model as : ...
16 views

### lme - pdMat dependency structure for mate choice experiment

I have conducted a mate-choice experiment where one test animal can choose between two stimulus animals at the same time. Thus, the response towards one stimulus animal is always dependent of which ...
34 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 ...
60 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 ...
77 views

### 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 ...
35 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 ...
5 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: ...
10 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 ...
18 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 ...
31 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 ...
56 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 ...
48 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: ...
14 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 ...
10 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 ...
32 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 ...
21 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 ...
6 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. ...
22 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 ...
48 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 ...
30 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 ...
61 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 ...
36 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 ...
56 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 ...
104 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 ...
24 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 ...
30 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 ...
105 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 ...
34 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 ...
152 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 ...
42 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 ...
52 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) ...
52 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 ...
102 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 ...
74 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 ...
16 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 (...
27 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 ...
105 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 ...
48 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 ...
28 views

...
447 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 ...
51 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 ...
40 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 ...
54 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 ...