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

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

How to extract values for only one particular fixed factor from lmer object in R? [on hold]

I have following output for lmer object constructed using coxme package: ...
0
votes
0answers
20 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
9 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
10 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
17 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
35 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
14 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
75 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
24 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). ...
0
votes
0answers
67 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
41 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
36 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
20 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
142 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
58 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
71 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
39 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
51 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
22 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
46 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
38 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
27 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
44 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
53 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. ...
0
votes
0answers
34 views

Degrees of Freedom of Cross-Level Interactions Terms in LME/LMER models

I am currently working on a hierarchical linear model using a dataset with variables on two levels. Level 1 variables have roughly 90000 observations and level 2 variables 141 observations. ...
0
votes
0answers
17 views

Correlated subjects in linear mixed model

I have a continuous variable that I want to model using linear mixed model. Goal is to measure two effects related to city and data source from which the variable came. The target variable is in fact ...
0
votes
0answers
80 views

How to test fixed vs. random effects for lme in R?

I have ran two lme mixed effects models in R, both using the same fixed effects variables but each with a different random effect variable. My reviewer has said I should use the Hausman test to ...
0
votes
0answers
19 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
138 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
78 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
414 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
231 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
27 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
256 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
42 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
85 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
131 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
1answer
50 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
46 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
395 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
87 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
45 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
42 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
100 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
23 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
447 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): ...
5
votes
0answers
472 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
171 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 ...