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
0
votes
1 answer

Error in anova(): "Error in getResponseFormula(el) : 'form' must be a two-sided formula"

I have a longitudinal dataset for plant growth recorded in different seasons. I fitted the data to growth models with/without seasonal effect using nlme function from nlme package. To see the seasonal effect on the estimated parameter (k), I…
TKH_9
  • 105
  • 1
  • 7
0
votes
0 answers

Error in nlme.formula: step halving factor reduced below minimum in PNLS step

Data I have a longitudinal dataset for plant growth that includes repeated measurements in different seasons. It is a large dataset with over 100 individuals,so I can't put all the data here but the data look like this > df head(dat) # A tibble: 6 x…
TKH_9
  • 105
  • 1
  • 7
0
votes
1 answer

lme4: How to specify estimated parameters for a specific model in the lmer function?

I have a longitudinal dataset for plant growth, where each row represents an individual plant's measurements over multiple seasons. The variables in the dataset include "id" (individual plant ID), "season" (the seasons that the plant…
TKH_9
  • 105
  • 1
  • 7
0
votes
0 answers

Getting rid of NA group in legend of plot?

I wanted to force my nlme regression line through the origin so I added a (0,0) data point to my data sheet. I didn't give it a site and this is resulting in a NA group in the legend of the graph. It achieved in forcing the line through the origin…
0
votes
0 answers

Syntax for "groups" argument in R's nlme function; multiple groups

The crux of my problem (as far as I can tell) is that no examples are out there that give the proper syntax for nested groups when coding the groups argument of nlme. All examples only give a single group as an argument, if groups is even included…
AndyH
  • 1
  • 1
0
votes
0 answers

R-Studio: Error message using exatcRLRT-function

`Hi guys, I´m quite new to R, but I still try my hand on a discontinuous growth modeling using nlme. To test, if it makes sense to enter a random slope into the model, I´ve used the exactRLRT function, unfortunatly I´ve got the following Error:…
0
votes
0 answers

Repeated Measures Mixed Model with Random Factors

I'm trying to perform a mixed model with repeated measures, and I'm not sure if I'm doing it correctly, as the time periods are not included within my formula. I have 2 treatments occurring in 2 blocks, replicated over 2 years. I've taken…
0
votes
0 answers

How can I estimate the growth models' parameters in nonlinear mixed-effects models using Logistic and Gompertz functions for each ID as x=Age & y=Wt?

How can I estimate the growth models' parameters (by nlme package) of Logistic and Gompertz functions for each ID as x=Age & y=Weight? And how can I add the three covariates (Country, Sex, & Area)? Dear all, I have a data set like this in Excel…
Alex2024
  • 1
  • 1
0
votes
1 answer

How to avoid singularity error in fitting piece-wise linear mixed effect regression model in R?

I am trying to fit a linear mixed effect model to longitudinal haemoglobin (Hb) count data from a two-arm clinical trial. A subset of the data in long form is shown below: pid site arm pday Hb pday2 I 1 MOB2004_001 Boane SP 0 8.5 …
0
votes
0 answers

Box Cox Back transformation of coefficients and confidence intervals

I have made a simple gls model with a continuous variable as the response and a categorical as the predictor. I have used box Cox transformation to the response because it was highly skewed. How can I back transform the coefficients and their CI? I…
les2004
  • 105
  • 7
0
votes
0 answers

How to run a multivariate multilevel model in R using nlme or lme4 packages?

Multivariate multilevel model with R (nlme or lme4 packages) I am trying to run a multivariate multilevel model with R. We're analyzing an RCT study with four measurement points and two outcomes. We have already performed two separate MLMs but the…
0
votes
0 answers

lme() in R - Linear mixed model for repeated-measures design. Fit independent slopes to determine associations within levels of the repeated measure?

I did an experiment in which 30 people listened to 3 songs ("A", "B", and "C") in a random order. For each participant and song, I got the mean "body temperature" and the mean "heart rate" during the listening task. This is, I have a…
Rachel A.
  • 1
  • 2
0
votes
0 answers

Three level mixed model with a random slope on only one level (nlme)

I would like to fit a mixed model in R using the library nlme. I have three levels: election year, district, and candidates (unfortunately I cannot share the data). Districts are nested in election year. Now I would like one of my predictor…
0
votes
0 answers

Cannot address heteroscedasticity in LMM (nlme R)

I'm trying to build a linear mixed model in R using nlme. My response variable is distributed like that: My final model presents a lot of heteroscedasticity and I cannot find a solution to correct it. The model is something like : lme(mass ~ n_boat…
0
votes
0 answers

How to handle multidose PK data where we do not have concentration data for every time point for which we have dosing data

I am not a pharmacometrician but am attempting a preliminary data analysis for a grant submission, i.e., I do not yet have an expert involved so I am seeking advice here on the following: I am attempting to use the 'nlme' package in R to generate…
mmi
  • 1
  • 1