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
2
votes
3 answers

What is the lmer/nlme equivalent of the REPEATED subcommand in SPSS's MIXED procedure?

I came across an SPSS syntax like this MIXED value BY factor1 /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED=factor1 |…
statmerkur
  • 429
  • 3
  • 16
2
votes
0 answers

R: Bayesian package for nonlinear mixed effects model

I'm looking for a Bayesian parallel for nonlinear mixed effects models, specifically those using the nlme package in R. I've come across blme but that seems to be only for linear mixed-effects models. Would brms be appropriate in this case? I've…
Adrian
  • 9,229
  • 24
  • 74
  • 132
2
votes
0 answers

Specify within-subjects and between-subjects ANOVA model using lme or lmer, as fixed-effects

Is there a way to specify a two-way ANOVA, with one within-subjects predictor and one between-subjects predictor using lme (from nlme) or lmer (from lme4)? Perhaps this is a CrossValidated question, but I don't think I am interested in…
Kayle Sawyer
  • 549
  • 7
  • 22
2
votes
1 answer

How do I code a piecewise mixed-model in lme in R?

I followed this example for running a piecewise mixed model using lmer, and it works very well. However, I am having trouble translating the model to lme because I need to deal with heteroscedasticity, and lmer doesn’t have that ability. Code to…
2
votes
1 answer

What is the most appropriate method for contrasts in lme (nlme)?

I have a question regarding conducting post-hoc contrasts in a mixed glmm model. Essentially, my data is a series of response variables with fixed factors of 'Subject Type' (three types of subjects), 'Treatment' (four treatments), and 'Year' (two…
choppedpete
  • 29
  • 1
  • 3
2
votes
1 answer

Missing values in lmer vs gls

I have a longitudinal dataset that I am performing an HLM analysis on using lmer in lme4. I would like to compare the results from this analysis to the results on the same data but using glsin the nlme package. There are multiple measures for each…
llewmills
  • 2,959
  • 3
  • 31
  • 58
2
votes
0 answers

Mixed Model Repeated Measures from SAS to R

I am trying to convert SAS to R for a mixed model of Repeated measures.The SAS code is as follows: proc mixed data=pd method=reml ; by set; class id month arm; model eff=base arm month arm*month/s; repeated/subject=id type=un r; lsmeans…
Shayne03
  • 129
  • 4
2
votes
1 answer

Lsmeans package in R - degrees of freedom with lme models

I have a question regarding the degrees of freedom that are used by the lsmeans package in the case of a linear mixed model built with the nlme package. Here is an example to illustrate my question based on the Oats dataset. I am not trying to…
Aurélie
  • 75
  • 2
  • 7
2
votes
0 answers

nlme requires huge memory for n-of-1 analyses with an uncorrelated correlation structure

In SAS I can fit a linear mixed effects model for an n-of-1 study and it runs quickly when comparing multiple correlation structures following the examples from Chapter 7 in Singer and Willett (see code at…
2
votes
1 answer

Nested random effects in `lme {nlme}`

I have to fit an LMM with an interaction random effect but without the marginal random effect, using the lme command. That is, I want to fit the model in oats.lmer (see below) but using the function lme from the nlme package. The code…
utobi
  • 279
  • 8
  • 16
2
votes
0 answers

Recurring (but probably erroneous) error message in glmmADMB package

I am getting the same message over and over again in the glmmADMB package; however I think it may be erroneous since all the values I am getting when I run the different models on the Owls dataset agree with the output published in the glmmADMB…
llewmills
  • 2,959
  • 3
  • 31
  • 58
2
votes
1 answer

Error while running gls with nlme

I am trying to run the gls function but I keep getting this error message: "Error in model.frame.default(formula = ~var + FS, data = list(MINBIO15 = c(37L, : object is not a matrix" My data looks like this: MINBIO15 …
Julia
  • 21
  • 2
2
votes
1 answer

Extracting p-values for fixed effects from nlme/lme4 output

I am trying to extract individual elements (p-values specifically) from the fixed effects table contained within the object created by the summary call of a mixed-effects model. Toy data: set.seed(1234) score <- c(rnorm(8, 20, 3), rnorm(8, 35,…
llewmills
  • 2,959
  • 3
  • 31
  • 58
2
votes
1 answer

save lmlist coefficients and residuals to dataset

I have 100 groups with 40 observations each. I know there might be other appropriate models but i am currently only interested in the following. reg<-lmList(Y ~ Intercept + a + b + c + d | grp,data=data, pool=F) In order to save the residuals (from…
oblixram
  • 23
  • 3
2
votes
1 answer

specifying multiple separate random effects in nlme

I am analysing some whale tourism data and am trying to construct linear mixed effect models in the nlme package to see if any of my explanatory variables affect encounter time between whales and tourists. (I am also open to running this model in…