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

About Constrained Mixed Effects Models

Currently I want to fit a mixed effects model with positive or negative constraints on the parameters. For parameter estimation using Joint Modeling, we use nlme package, which is required by the JM package. In the lme function of the nlme package,…
unk
  • 1
  • 1
0
votes
1 answer

Convergence error code = 1 message = false convergence (8)

The convergence problem is something I never came to understand entirely, but I as far as I know, there are some keys in the code to get the model to convergence I am not attaching all the database because long-format exceeds the limits here. I…
0
votes
0 answers

Why does this piecewise linear mixed model not produce equal estimates at the knot

I am wondering if someone could help me interpret my piecewise lmm results. Why does ggpredict() produce different estimates for the knot at 10 weeks (end of tx; see ‘0’ in graph at end)? I've structured the data like so: bpiDat <- bpiDat %>% …
0
votes
1 answer

How to incorporate a random effect into a nonlinear mixed effect (nlme) model?

I'd like to build a nonlinear mixed effect model that describes the relationship between two variables, "x" and "y", which vary randomly by a third variable "r" using an exponential rise to a maximum as described by the equation: y =…
0
votes
0 answers

Crossed or nested random effects in lme

I have doubts about how to specify the random effects structure in my mixed models. My experimental design consists of 12 independent enclosures (Encl) with populations of lizards (Subject*_ID).* We applied 2 crossed treatments (Lag: 3 levels and…
0
votes
1 answer

How to run an exponential decay mixed model?

I am not familiar with nonlinear regression and would appreciate some help with running an exponential decay model in R. Please see the graph for how the data looks like. My hunch is that an exponential model might be a good choice. I have one fixed…
0
votes
0 answers

Nonlinear parameter estimation with nlme, with plot-level random coefficient

I'm trying to estimate a function with 3 parameters, whereof 2 (growth parameters b, v) are shared between all sites, and 1 (asymptote A) is specific to each site. nlme reports: Error in MEEM(object, conLin, control$niterEM) : Singularity in…
0
votes
0 answers

Simulate_nlme parameters value

datasetG <- groupedData(p ~ t | experiment, data = dataset) mymodel <- nlme(p ~ a/(1+b * exp(-k*t)), data = datasetG, fixed = a + b + k ~ 1, random = a + k ~ 1, start = c(a = mychutes_a, b = mychutes_b , k = mychutes_k)) simulate_mymodel <-…
0
votes
0 answers

How to obtain predicted values with prediction intervals from nlme::gls object with autocorrelated residuals

I'm doing analysis with a model as below with autocorrelated residuals on time series data, and am trying to make predictions with pred intervals. model<- gls(data=data, outcome~variable1+variable2, correlation = corARMA(p = 1, q = 0), …
0
votes
1 answer

Linear mixed-effect models (nlme/ lme4) interpretation of marginal and conditional R^2 values

I'm investigating bacterial diversity and want wo know if the diversity is dependent on the pH. My data are structured as followed: I have a dataset of 17 different studies each study has values for diversity and for pH (the number of values differ…
Luckylou
  • 1
  • 2
0
votes
0 answers

nlme error with lme function: function evaluation limit reached without convergence

I am conducting a linear mixed effect model with random intercept and slopes with the lme function from the ````nlme``` package in R. library(readr) library(nlme) #Data post = read_csv("C:/data.csv") post$regions <-…
Thomas
  • 441
  • 3
  • 16
0
votes
0 answers

How to fit autocorrelation structures in a diving glmer model vs nlme and glmmTMB models?

I want to compare diving behaviour between penguin populations breeding at different locations using generalized linear mixed effects models (glmer). The data looks like this: # A tibble: 12 × 7 # Groups: ID [1] ID begdesc …
0
votes
0 answers

Extract coefficients of list of list of lme

I am struggling to get coefficients out of a list of list of several variables in linear mixed-effects model. I was looking for get the p-values of the interaction time:group, with a loop or sapply because I have 60 variables, and doing it…
0
votes
1 answer

non-linear mixed models with categorical covariates: obtain parameter estimates by group

After fitting a non-linear mixed model with crossed categorical covariates, how do you write the model equation (with parameter estimates) for each group combination? library(ggplot2) library(tidyr) library(dplyr) data(CO2) Using the CO2 data set…
emudrak
  • 789
  • 8
  • 25
0
votes
0 answers

cAIC4: running it using lme model results in immediate fatal error of R

When trying to use cAIC4::cAIC() for my mixed model (I have several models with different random effects structures, including random intercepts only, random intercepts and slopes, random intercepts and specification of serial correlation etc.)…
yentl02
  • 25
  • 4