Questions tagged [nlme]

An R package for fitting Non-Linear Mixed Effects statistical models.

An package for fitting Non-Linear Mixed Effects statistical models ().

Repositories

Books

Other resources

Related tags

494 questions
1
vote
1 answer

texreg with lmer and lme objects -- variances differ

Folks, I'm trying to print a {texreg} table of lmer() {nlme} and lme() {lme4} models including variances. The variances however, differ significantly between the two model (several orders of magnitude). It seems that the lme() variances are the…
Chris
  • 1,479
  • 2
  • 15
  • 19
1
vote
2 answers

Can plot interaction means for nlme fit, but not for lme4

Using this dummy dataset: dummy.data <- data.frame(vaccinated = factor(rep(c("yes", "no"), each = 64)), infected = factor(rep(c("yes", "no"), each = 32)), animal = factor(rep(1:16, each = 8)), tissue = factor(c("blood", "liver", "kidney",…
tractorjack
  • 127
  • 8
1
vote
1 answer

issues with groupedData()

I'm following a tutorial on mixed effects models. The tutorial uses egsingle dataset from mlmRev package. As part of the tutorial, the author uses groupedData() as: egsingle <- groupedData(math ~ year | schoolid/childid, data = egsingle) Could…
Sam
  • 4,357
  • 6
  • 36
  • 60
1
vote
1 answer

change fitted line colour in nlme() trellis plot?

I am trying to use a grouped data to fit and then plot plot(augPred(fit)). However, I would like to change the line color as it is the similar color of the points. Is there a way to make the lines in a different color? Also, I would like to remove…
Ravi
  • 81
  • 1
  • 4
1
vote
1 answer

How to drop terms from a mixed model formula

I have a rather specific regular expressions problem that is causing me some grief. I have removed one or more fixed effects from a mixed model (either lme or lme4), and wish to remove the corresponding random slope(s). However, depending on the…
jslefche
  • 4,379
  • 7
  • 39
  • 50
1
vote
1 answer

How to pass the 'object' argument dynamically to anova() function

I am struggling to write a script which allows for a more flexible approach to compare different linear mixed-effect models making use of the lme4 or nlme package. As I do not want to adjust the script for each and every model I add or drop, I am…
ToJo
  • 1,339
  • 1
  • 15
  • 26
1
vote
1 answer

Non linear mixed model

As a R beginner, I am trying to fix a model given including a random factor. The formula is: Temp ~ a - (b * exp(-c *rate)) Where Temp is temperature and rate is a measure of the variation (time/temp). For construct the model and get the initial…
dej
  • 11
  • 2
1
vote
1 answer

How to predict with with nlme::predict.lme without calling the whole 'object'

Using lme function, I fitted a model on a large data set with near 470K observations and about 40 variables. The size of this fit (object.size(fit)) is near 300 Mb, which is not feasible to store in a server. The goal is to let a user to…
Isaac
  • 13
  • 5
1
vote
1 answer

Successively removing predictor variable from formula

I have a model formula in the form of model.all <- lme(Response ~ A + B + C) I would like to update this model by successively removing a predictor variable from the model, so I would end up with 3 models, specifically: mod.1 <- lme(Response ~ B…
user2507608
  • 355
  • 1
  • 6
  • 18
1
vote
0 answers

Singular precision matrix warning in R

I'm running different model of this form: gamm(H_1_3~ s(wcomp.x.cum, bs='cr')+s(wcomp.y.cum, bs='cr')+s(h_AST, bs='cr'), na.action=na.omit,data=lag4_1DAY, method='REML', weights=vf) R doesn't throw me an Error (i.e. I have an output)…
Filippo
  • 309
  • 1
  • 2
  • 10
1
vote
2 answers

'non-conformable arrays' error in weighted non-linear mixed model

I have successfully fitted a non-linear mixed model with the nlme() function of the nlme package, but in trying to improve said model by including a weights argument, I get nothing but errors I could not interpret, and I have therefore been unable…
Chris. Z
  • 365
  • 1
  • 7
  • 17
1
vote
1 answer

Looping in nlme

Hi I am trying to perform a loop function to in which a new predictor variable is used in each iteration, however I get the following error. Error in model.frame.default(formula = ~age_c + zglobcog + apoee4_carrier + : variable lengths differ…
Andrews
  • 325
  • 3
  • 13
1
vote
1 answer

R's pdIndent function in RPy

I am working on translating the code for the lmeSplines tutorial to RPy. I am now stuck at the following line: fit1s <- lme(y ~ time, data=smSplineEx1,random=list(all=pdIdent(~Zt - 1))) I have worked with nlme.lme before, and the following works…
TheChymera
  • 17,004
  • 14
  • 56
  • 86
1
vote
2 answers

View R data examples via RPy (example: lmeSplines)

I am currently trying to reconstruct the Example code for lmeSplines (page 4 and 5 on the official documentation). The first line of code is (in R syntax): # smoothing spline curve fit data(smSplineEx1) How can I view this data via RPy? I…
TheChymera
  • 17,004
  • 14
  • 56
  • 86
1
vote
0 answers

Differences between nlm p-values and confidence intervals

I have a data set where I estimated home range size using 10 estimators from 41 individuals. I wanted to test if these estimators were significantly different from each other so I fit a linear mixed-effects model with nlme as…
JBauder
  • 91
  • 1
  • 5