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

Convergence error with lme for 2 genes out of 4608

I am using lme to eradicate spot effects from microarrays for 8 independent subjects and 4608 genes. Whenever I am trying to run "lme" it gives an error which is below ...
0
votes
1answer
60 views

“Error during wrapup: the leading minor of order 2 is not positive definite” when trying to use LME with random slopes

This works fine: lme(fixed=target~target_projection, random= ~ 1|CLINICIAN_USER_ID, data=study_pop) But if I try to let the slopes vary: ...
1
vote
0answers
27 views

How do I fit a linear mixed model in R with autocorrelation, when the effect of time is of no interest?

I am attempting to fit a linear mixed model with the lme function using R. My data involve repeated measures, but the effect of time is not of interest to me, so I don't want to include it as a fixed ...
2
votes
1answer
96 views

lme summary() interpretation

Need some help interpreting the summary() -function results. I am running a lme from the package nlme in R. I have a simple ...
0
votes
1answer
68 views

Should I include this fixed effect? lme4 likelihood ratio test and lmerTest anova disagree

I have a mixed-effects model with two fixed effects and one random effect (group membership) estimated using lme4. log_dv ~ iv1 + iv2 + (1 | group) I want to ...
0
votes
1answer
21 views

Trouble getting LME in R to work with within-groups (repeated Measures) data

I’m having trouble figuring out how to apply the LME function to a set of data. What I have is a list of Stores and their respected customer count, by week, with various external factors for each ...
2
votes
1answer
69 views

Using B-splines within a linear mixed-effects model in R

I am using linear mixed-effect model (run with the lme() function in the nlme package in R) that has one fixed effect, one ...
0
votes
0answers
17 views

glht on gamm results

I have a GAMM model that has both an LME and a GAM part. I have used glht (multcomp) to check significant differences through the code: ...
2
votes
0answers
41 views

Multiple comparisons for variance structure in R lme fit

How can I compare variances for different levels of a factor in a mixed effect model? I'm fitting a mixed effects model (in R using the ...
0
votes
0answers
58 views

R code for standardized coefficents and model effect size using nlme

I have fit a longitudinal random effects model using nlme and I prefer nlme because I can get p-values. While working with a ...
0
votes
0answers
8 views

Variance component analysis nlme

Is there a way to carry a variance component analysis using nlme or lme4 packages and how would I calculate the percentage of variance that is attributable to the random effects? For example, my ...
0
votes
0answers
28 views

What type of post hoc test does a LME use by default?

I need to know what type of post hoc test a LME model is using in R, by default? Is it Tukey? And is the alpha modified?
0
votes
1answer
165 views

Post Hoc test after lme [closed]

I am trying to run a Post Hoc test (glht) after a linear mixed model (lme) in R. I was ...
0
votes
0answers
51 views

Repeated measures linear mixed effects model

I am working with trees that were fertilized in a full factorial design (N x P x K) in plots that are replicated four times. I currently have a mixed effects model with this structure: ...
0
votes
0answers
24 views

Partial derivative from lme or lm object

I'm looking for an R package, or another approachable way in R to obtain the first partial derivative of choice from an lm or lme object. I'm aware of http://stats.stackexchange.com/a/8253/13758 but ...
1
vote
0answers
33 views

Assumptions for nlme

I want to analyze a repeated measure design with two independent variables (var1, var2) where the subjects had to solve three ...
0
votes
0answers
58 views

Hierarchical weighted linear regression through the origin and varying slopes within groups

I am trying to fit a hierarchical linear regression model. My data includes samples with 10 different classes, and samples have varying numbers of data points (from 1 to ~1000). I want to fit a ...
0
votes
0answers
17 views

Standard errors of estimates in multi factorial LMEM

This question may already be well-answered as it seems relatively straight forward, but my search of existing posts has failed... apologies if it is redundant. I am building a linear mixed effects ...
4
votes
1answer
214 views

What statistical test is performed by summary(glht(model, linfct=mcp(factor=“Tukey”)), test=adjusted(type=“none”))?

I have data that I have fit using lme with the following structure (Subject is implemented as a random effect in order to account for multiple paired comparisons): ...
2
votes
0answers
223 views

Accounting for heteroskedasticity in lme linear mixed model?

I have a data set where I measured the number of molecules (M) present in cells as a function of drug (with or without) and days of treatment (5 timepoints). I repeated the experiment 3 times, with ...
1
vote
0answers
118 views

Mixed and random effect model with multiple crossed random effects in lme4 vs nlme

I am trying to fit a few models as follows for my data of observations recorded from $p$ genotypes planted in $n$ locations for $m$ years. The aim is to estimate BLUPs finally. $$Y_{ijk} = \mu + G_i ...
0
votes
0answers
36 views

How to interpret 3 main effects when an interaction exists for only two of the variables?

I've been searching for interpretation guidance regarding the below problem, but all the resources I've seen have been fully crossed (i.e., all variables included in the interaction term). Below is a ...
1
vote
1answer
242 views

lme() with several within and between (categorical and continuous) subject factors

I am currently trying to analyse data from an experiment of mine and I have done some searching for instructions on the usage of the lme() function for R, since I am looking to analyse my data with a ...
1
vote
0answers
38 views

Estimated random effects correlation of 1 when fitting a random intercept model using lme

I am trying to fit the linear random effects model: $y_{ijk}=\theta_{ij}+\epsilon_{ijk},$ where $\theta_{ij}$ is a random effect. I assume the random effects and error distributions are normal. ...
0
votes
0answers
20 views

How to calculate confidence intervals using gamm?

I have a problem calculating confidence intervals from a gamm model. My data looks like this: As you can see, these are longitudinal data of subjects in groups (Each subject appears only in one ...
0
votes
0answers
62 views

Random effect model result of R and JMP

I have two groups of people, namely A and B. We have the hourly mean heart rate for 45-80 hrs, length differed by individual. We are interested in the group*time effect on the heart rate. Since I have ...
1
vote
0answers
122 views

including interactions in a mixed linear model in R (lme)

I'm trying to test for the effect of soil moisture on transpiration rates. I have plot-level data for 18 plots in 6 different stands of trees (3 plots x 6 stands). I want to treat "stand" as a random ...
0
votes
0answers
46 views

Intuitive feel in mixed effect models

This is something I have been thinking about for sometime. Consider the random effects model $y= Zu + e$ where $u \sim N(0, \sigma^{2}I)$ and $ e \sim N(0, \epsilon^{2}I)$ I now want to compare 2 ...
2
votes
1answer
282 views

Multivariate model in lme() with independent random effect, similar to MCMCglmm

I would like to specify a multivariate model with lme with a random effect for group which is independent across variables. I found this post, which explains that ...
0
votes
0answers
89 views

allowing for different variances between groups versus allowing for random slopes in lme

I have a data set that looks like this: Genotype Condition Trait A 1 0.0007 B 1 0.005 A 2 0.0003 B 2 ...
0
votes
0answers
30 views

differences between different notations in mixed effects model

I have never been so confused in my life. Could anyone please tell me what is the difference between the following mixed effects models: ...
0
votes
0answers
72 views

Choose random structure in LME. Should I rely on AIC?

I want to choose the best random structure for my mixed-effects model. I have compared four models: without a random part, random intercept, random intercept and slope, and random effects: ...
1
vote
0answers
51 views

What is the equivalent of a repeated ANOVA using a mixed effect model with lme?

I have a data frame with this structure: ...
0
votes
0answers
36 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
45 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
545 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
122 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
86 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
230 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
1answer
165 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
297 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
850 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
161 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
72 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 ...
2
votes
0answers
307 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
88 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
767 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
355 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
110 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: ...
6
votes
3answers
6k 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 ...