184 questions
1 vote
0 answers
46 views
What does "Error in UseMethod("mutate")" mean, returned from `DHARMa::simulateResiduals()"?
library(glmmTMB) library(dplyr) library(DHARMa) ml <- glmmTMB(menthlth ~ sex + medcost + ..., ziformula = ~ sex + medcost + X_educag + internet + ..., data = ...
0 votes
0 answers
26 views
How to define correlation structure for relational data in glmmTMB?
I have relational data, i.e. observations for pairs of objects. More specifically these are migration rates between plant populations, which I would like to explain by a predictor. The migration rates ...
0 votes
0 answers
26 views
Can we force bootMer to ignore convergence warnings?
I fitted a complex betabinomial model with very large values for both variables comprised in the response variable (cbin(Methylated_C, unMethylated_C)). model <- glmmTMB( ...
1 vote
0 answers
90 views
How to get estimated expected values in glmmTMB?
Is there a way to obtain estimated expected values from a glmmTMB object? Specifically, if Y is the response vector and X,Z are design matrices for fixed and random effects respectively, I want an ...
1 vote
0 answers
65 views
Estimated covariance matrix in glmmTMB
I would like to obtain the estimated covariance matrix of the (random) linear predictors from a glmmTMB object in R, or at least the diagonal of that matrix, that is, the variances. In lme4 the full ...
3 votes
1 answer
107 views
glmmTMB with smooth terms and random slopes
I'm a newb using glmmTMB, especially with smooths. The first model (m1) gives me what I expect: parallel smooths for each site since there are random intercepts for site. My question is: is the second ...
2 votes
1 answer
152 views
glmmTMB: start a new optimization at the optimum of previous model
Suppose I have the following model: library(glmmTMB) Owls <- transform( Owls, Nest = reorder(Nest, NegPerChick), NCalls = SiblingNegotiation, FT = FoodTreatment ) fit_zipoisson <- ...
0 votes
0 answers
37 views
Retaining random effects in buildglmmTMB
I am using buildglmmTMB to build a model for several different taxa. I have 700 ish taxa and ~10 effects. I have a script that loops through all the taxa and applies buildglmmTMB to each taxa ...
0 votes
0 answers
54 views
Any known changes to glmmTMB since 2023 that would alter model fit?
I used glmmTMB to run GLMMs with a beta distribution to evaluate the proportion of time an animal spends doing a behavior. My observations were of different lengths, and I weighted the observations ...
0 votes
1 answer
115 views
Print mice imputed glmmTMB conditional and zero-inflated model side-by-side with modelsummary
Consider the following estimate: library(glmmTMB) library(mice) Owls <- Owls Owls[sample(1:nrow(Owls),10), "ArrivalTime"] <- NA predictorMatrix <- quickpred( Owls, include = ...
4 votes
1 answer
95 views
glmmTMB issue with number of observations and groups
I have a dataset with 125 animals across 3 sites and 100500 observations. Both show up properly when looking at the structure of the data but when I run the model with an updated data frame (I added a ...
0 votes
0 answers
103 views
problem with glmmTMB with a matern for spatial autocorrelation
I have a dataset of bird counts, on a spatial grid, with environmental and prey data. I have applied a correction factor for distance from observers, so I have semi-continuous values, with lots of 0's ...
0 votes
0 answers
120 views
Can I use the segmented package with a generalized linear mixed model?
I am working on a grant proposal evaluating the effectiveness of an intervention on several different groups of hospitals and after some statistical consulting have landed on using a generalized ...
0 votes
1 answer
145 views
Confidence intervals for each grouping factor in glmmTMB model
I'm treating a data with one continuous variable and one categorical variable. I built a model as following using glmmTMB: m=glmmTMB(y~x+(1+x|group), family=Gamma(link="log"), data=dat) '...
1 vote
3 answers
171 views
How to extract Std.Dev from VarCorr glmmTMB
I'm using the emmeans package with a negative-binomial model implemented using the glmmTMB package. I'm trying to bias adjust my backtransformed emmeans per the workflow illustrated here: https://cran....