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

Error while using the weights option in nlme in r

Sorry this is crossposting from https://stats.stackexchange.com/questions/593717/nlme-regression-with-weights-syntax-in-r, but I thought it might be more appropriate to post it here. I am trying to fit a power curve to model some observations in an…
FloLe
  • 41
  • 5
2
votes
1 answer

converting proc mixed to R

I have been trying to convert some PROC MIXED SAS code into R, but without success. The code is: proc mixed data=rmanova4; class randomization_arm cancer_type site wk; model chgpf=randomization_arm cancer_type site wk; repeated /…
user20780
  • 31
  • 3
2
votes
1 answer

How does one compute the "normalized" model residuals based via lme4/merMod in R?

The nlme package gives me a way of compiting the normalized residuals using resid(fitted object, type="normalized") but lme4 has no option to do so. I cannot diagnose autocorrelation without this feature in lme4. I do not think the R stats package…
BornPerson
  • 123
  • 7
2
votes
1 answer

Nonlinear mixed models: what am I doing wrong?

I am working with a data set that is comprised of three columns: patient ID (ID), TIME, and cervical dilation (CD). I apologize in advance for being unable to share my data, as it is confidential, but I have included a sample table below. Each…
DC22
  • 23
  • 3
2
votes
2 answers

How can I incorporate a categorical variable with ~200 levels in a nonlinear mixed effects model in R?

I am trying to fit a nonlinear mixed effects model with a categorical variable genotype that has around 200 levels. So this is the linear version of the model. mlinear <- lmer(WUE ~ moisture * genotype + (1|pot), data = d8) Now I'm trying to make…
Jon
  • 21
  • 1
2
votes
1 answer

Linear mixed model and factorial design with 3 levels

Four common bean trials were established in fields, one trial per year. We combined density, bean genotype, and fungicide to manage white mold with a factorial scheme. The experimental design was a randomized complete block with four replicates.…
2
votes
1 answer

Linear Mixed Model (NLME or LMER) - Putting bounds on coefficients/estimates

I am trying to build put bounds on Mixed effect model. I usually use LMER function for my models but I am not able to find any way to put bounds on the coefficients. I tried using LME but even this was not helpful. Can anyone help…
kawsleo
  • 560
  • 4
  • 23
2
votes
1 answer

Fitting an exponential decay model using SSasymp

I'm modelling the salinity levels in four estuaries in relation to freshwater discharge from a large river (which impacts all 4 estuaries), where each salinity station is being included as a random effect (multiple sensors in each estuary). My df…
Splash1199
  • 379
  • 3
  • 14
2
votes
0 answers

"Covariate must have unique values within groups for corCAR1 objects?" Can't find the mistake

I try to analyze an ESM-Data-Frame, but have huge problems with my time-Variable? I am getting this error message: covariate must have unique values within groups for corar1 objects I really don't know what to do? I created the time differences in…
chris_uibk
  • 21
  • 5
2
votes
1 answer

Can I use interaction terms with psem in piecewiseSEM?

I am trying to use interaction terms with psem in the piecewiseSEM package but I get the following error: Error in names(B) <- numVars : 'names' attribute [3] must be the same length as the vector [2] lme(response1 ~ predictor1 * predictor2,…
user3508884
  • 75
  • 1
  • 1
  • 8
2
votes
1 answer

Error including correlation structure in function with gamm

I am trying to create my own function that contains 1.) the mgcv gamm function and 2.) a nested autocorrelation (ARMA) argument. I am getting an error when I try to run the function like this: df <- AirPassengers df <- as.data.frame(df) df$month <-…
Sam G
  • 23
  • 3
2
votes
1 answer

Graphs of the mixed effects model residuals using the ggplot2 function

I am trying to graph the residual effects of the mixed effects model using the ggplot2 function. However, after performing a search I found some functions available but what seems to me is that for the function nlme they are not working. The graphs…
user55546
  • 37
  • 1
  • 15
2
votes
0 answers

What is the correct way of interpreting the effect of two interaction terms in lmer?

I am interested in examining the effect of time on the levels of antibodies and how that relationship in influenced by the interaction of gender and age. This is how I have built my model. I have included a random intercept for repeated…
2
votes
2 answers

Using formula to predict inside of R function generates `object not found` error

Let me preface this by saying that there are similar questions to mine on Stackoverflow, but I have not seen them answered to my satisfaction, and the answers that were given don't help me with the problem I'm having. Also this is a long question…
Jordan Mandel
  • 478
  • 3
  • 14
2
votes
1 answer

Residual modeling for mixed models: Any other package than nlme?

Aside from R function nlme::lme(), I'm wondering how else I can model the Level-1 residual variance-covariance structure? ps. My search showed I could possibly use glmmTMB package but it seems it is not about Level-1 residuals but random-effects…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72