Questions tagged [glmmtmb]

glmmTMB fits generalized linear mixed models (GLMMs) and extensions. It is intended to handle a wide range of statistical distributions (Gaussian, Poisson, binomial, negative binomial, Beta …) and zero-inflation. Fixed and random effects models can be specified for the conditional and zero-inflated components of the model, as well as fixed effects for the dispersion parameter.

The first stop for information on glmmTMB is its GitHub pages site, especially the "where to ask questions" section.

137 questions
2
votes
2 answers

Extracting posterior modes and credible intervals from glmmTMB output

I normally work with lme4 package, but the glmmTMB package is increasingly becoming better suited to work with highly complicated data (think overdispersion and/or zero-inflation). Is there a way to extract posterior modes and credible intervals…
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
2
votes
1 answer

zero-inflated overdispersed count data glmmTMB error in R

I am working with count data (available here) that are zero-inflated and overdispersed and has random effects. The package best suited to work with this sort of data is the glmmTMB (details here and troubleshooting here). Before working with the…
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
1
vote
0 answers

Transform predictions on link scale to response scale for truncated distributions

I noticed when trying to back-transform predictions for my zero-truncated negative binomial model on the link scale to the response scale, the values are not the same: set.seed(1) data <- data.frame("x" = rep(1:5, 2), "y" =…
Zoe
  • 906
  • 4
  • 15
1
vote
1 answer

Error using parallel processing with snow in bootMer on glmmTMB object

I am encountering an error while attempting to use parallel processing with the "snow" argument in the bootMer() function on a glmmTMB object in R. I followed the suggestions provided in a previous answer, but the issue remains unresolved. Here's a…
1
vote
0 answers

How to extract Lambda and Nu parameters from glmmTMB Conway-Maxwell Poisson regression model

I'm trying to build Conway Maxwell Poisson model with glmmTMB package with model's family = "compois". The model works okay but I cannot find any output from the model that expresses the Conway-Maxwell's Lambda and Nu parameters which hinders me to…
1
vote
1 answer

How to compress proportion data to remove 0 and 1 values?

I am working with data of vegetation cover (proportions) for different height strata (0-5, 5-15, 15-30, >30 cm, and also bare ground) amongst four different sites (sitio) and two different time periods (epoca: breeding and non breeding season). I…
1
vote
0 answers

Fit a spatial model in spaMM, glmmTMB, or R-INLA

I have a dataset that contains two sites (i.e., sites 1 and 2). The data in each site is arranged in a row-column layout (e.g., 3 rows by 4 columns). Below is an example for my dataset, where trt is the main factor of interest, and row, column, and…
nhavt
  • 349
  • 2
  • 10
1
vote
1 answer

R packages lme4 and glmmTMB produce different AIC for the same model and data

I fitted the same model to the same data using lmer(){lme4} and glmmTMB(){glmmTMB}. The model's AIC differed depending on the function used, and I would like to know why. I generated the following random-intercept…
Marco Plebani
  • 436
  • 2
  • 14
1
vote
1 answer

Converting mixed model with correlation structure from nlme to glmmTMB

I wanted to use predict on some averaged models which were built in nlme to plot confidence intervals of modelled relationships. But, I've found this is not possible using nlme and MuMIn::model.avg. Instead, I plan to use glmmTMB, as suggested here.…
pajul
  • 123
  • 9
1
vote
1 answer

How to structure random slope with interactions using glmmTMB in R

I am trying to: Build a model to investigate the effect of landcover (a continuous variable) on presence of a species. Test if and how this effect changes with season (a categorical variable, spring and fall). However, no animal in my data set has…
tara
  • 13
  • 2
1
vote
1 answer

How to correctly interpret glmmTMB models with large z statistics/conflicting error messages?

I am using glmmTMB to run a zero-inflated two-component hurdle model to determine how certain covariates might influence (1) whether or not a fish has food in its stomach and (2) if the stomach contains food, which covariates effect the number of…
1
vote
1 answer

Predicting from glmmTMB with truncated counts

I'm running a glmmTMB model with various truncated count distributions (truncated_poisson, truncated_compois, truncated_nbinom1, truncated_nbinom2). When I predict from the model, the values seem to be lower than expected, as if the prediction is…
user2602640
  • 640
  • 6
  • 21
1
vote
1 answer

glmmTMB_phylo: Error in Matrix::rankMatrix(TMBStruc$data.tmb[[whichX]]) : length(d <- dim(x)) == 2 is not TRUE

I am trying to run the following model: mod1<- phylo_glmmTMB(response ~ sv1 + # sampling variables sv2 + sv3 + sv4 + sv5 + sv6 + sv7 + (1|phylo) + (1|reference_id), #random effects ziformula = ~ 0, #ar1(pos + 0| group) # spatial autocorrelation…
1
vote
1 answer

Likelihood ratio for glmmTMB model?

I have a mixed model where I'm trying to find the significance of my random effect. The model is a mixed model with zero-inflated beta distribution which I built using the R package glmmTMB, with the following…
Cam
  • 449
  • 2
  • 7
1
vote
0 answers

How to add a grid to an R plot - error int_abline .. plot.new has not bee ncalled yet

I am trying to plot effects from GLMM model and I would like to add a grid along y axis from 0 to 2 every 0.2 steps and from x from 0 to 0.030 every 0.003 steps. I am familiar with this in Python but the syntax in R is still not clear to me. This is…
1 2
3
9 10