Questions tagged [glmmtmb]

R package to fit linear and generalized linear mixed models with various extensions, including zero-inflation.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

DHARMa problems: Poisson or Zero-inflated negative binomial model?

I have a dataset of abundance of of rodent (AA) in 63 sites, which located in two main area (northern and southern part, NS). AA ...
user avatar
0 votes
0 answers
31 views

Random effect with compound symmetric covariance structure in glmmTMB

I have a dataset of abundance of a kind of rodents(AA) in 63 sites, and want to know which environmental factors can explain the rodent abundance, and because the sampling sites are basically locate ...
user avatar
0 votes
0 answers
16 views

Specifying a correct model using glmmTMB while experiencing unusually large coefficients and z-statistics

I have a data set of an beetle community where I want to analyse species richness (for example). The experimental design is as follows: 4 blocks 19 plots 2 different treatments 3 samples of the ...
user avatar
0 votes
0 answers
16 views

ggpredict produces flat fit line for glmmTMB model

I am conducting a step selection analysis of animal movement data using a Poisson model in glmmTMB. The model runs as expected, however, when I use ggeffects to plot model predictions I get a flat ...
user avatar
0 votes
0 answers
13 views

emmeans, should I use ML or REML fitted models [duplicate]

I see a lot of examples out there which use ML or REML fitted models as an input for emmeans. If I understand correctly for model comparison of fixed effects for "fixed effects nested models"...
user avatar
0 votes
0 answers
14 views

Specify nested random effect in INLA

I am trying to understand how to specify nested random effect in INLA, but I do not succeed to reproduce the results of glmmTMB. My final goal is to build a model with random intercept and slope on ...
user avatar
1 vote
1 answer
34 views

Inflated or not inflated: true zero dilemma in GLMM

I have the models with overdispersion and almost 40% of the data set are true zeros with biological meaning. I'd like to study the temperature (temp) and time ...
user avatar
0 votes
1 answer
62 views

emmeans properly conducts multiple comparison for one glmmTMB model but not the other

I have two datasets from different years. They are structured almost identically. One is substantially larger than the other and has more time points. When I prepare a negative binomial generalized ...
user avatar
1 vote
1 answer
90 views

glmmTMB results in R summary() or Anova()?

I am wondering how to analyze differences between subspecies. I want to see if body mass differs between 3 subspecies of rodent and if sex and reproductive status are also different. We then want to ...
user avatar
0 votes
1 answer
44 views

Should I include "time" variable in GLMM of annual tree growth over a specified time period?

I've been looking through several publications on modeling (LMM or GLMM) tree growth over a specific time period and found significantly different approaches: whilst some studies use "time" ...
user avatar
  • 11
0 votes
0 answers
78 views

Differing confidence intervals between ggpredict() and ggemmeans() when REML = TRUE in glmmTMB beta regression

I am using the package ggeffects to estimate marginal effects and confidence intervals for a beta regression model fit with glmmTMB. I notice the estimates differ ...
user avatar
  • 77
0 votes
1 answer
46 views

Advice on improving the model fit of a mixed model on repeated measurements?

I've got repeated measurements data on an outcome including a total of 310 measurements (range in the amount of measurements per patient is 1-6) conducted in 149 ...
user avatar
  • 119
0 votes
0 answers
24 views

Valid to only use random slope for linear term when the variance of quadratic slope term is near-zero?

I am performing some habitat analyses across a large area and am incorporating random slopes in my models for landscape predictors and a random intercept for individual animal. According to this post ...
user avatar
1 vote
0 answers
16 views

Model comparison: what to do when reduced model doesn't converge?

This is a general question about how to do hypothesis testing via model comparison: I want to test the significance of several different predictors in a data set using model comparison. After a lot of ...
user avatar
  • 21
0 votes
0 answers
49 views

manually calculated the fitted values of gamma hurdle model from glmmTMB

I'm manually calculating the fitted values from a gamma hurdle model and compare the results with glmmTMB package. I transferred the response variable to be zero and non-zero and fitted the logistic ...
user avatar
0 votes
0 answers
30 views

Unusual model convergence problem with glmmTMB function

I had an unexpected problem while using glmmTMB function. I have three fixed effects in my model. One fixed effect is a categorical variable with 8 levels. These levels are: 'upper', 'upperright', '...
user avatar
0 votes
0 answers
126 views

Interpreting p-value from GLMMTMB model

I'm analyzing count data from an experiment, where I want to study whether colonies of ants with different ratios (0, 50 100) of infected workers have different foraging activities. I am using the ...
user avatar
0 votes
0 answers
96 views

Discrepancy between glmer.nb and glmmTMB results

I have been playing around with the generalized mixed models and I fit two models to the salamander data using glmer.nb and glmmTMB as shown below. ...
user avatar
0 votes
0 answers
19 views

How do I model serial correlation in a binomial model?

I'd like to test for trends in proportions of animals sampled over 12 years at six different beaches so that there is a separate trend test per beach. In the data below 'thisbeach' is the number of ...
user avatar
  • 31
1 vote
1 answer
368 views

Model residual diagnostics of gamma GLMM with log-link

I am trying to model fish length data (N > 115.000) which are highly right-skewed using linear mixed effects models. Actually all data make sense and the the extreme high values are valid ...
user avatar
  • 155
0 votes
0 answers
252 views

MMRM(Mixed Model for Repeated Measures) in glmmTMB using R

I am currently trying to analyze data using a model called MMRM (Mixed Model for Repeated Measures).I think it was first proposed in this document. Mallinckrodt, C. H., Clark, W. S., & David, S. R....
user avatar
  • 1
0 votes
0 answers
61 views

Shifting Raw Count Data for Covariate Effects in glmmTMB

I am looking for help on adjusting the values of my raw data (dependent variable = Count) based on the effects of two continuous covariates to go alongside model-predicted estimates in a plot derived ...
user avatar
1 vote
1 answer
136 views

DHARMa testZeroInflation: how to interpret output?

I'm analyzing count data with a negative binomial GLMM via the R package glmmTMB and lme4. I'm running DHARMa diagnostics, one of which is testing for zero inflation and I'm having some trouble ...
user avatar
  • 27
1 vote
0 answers
23 views

GLM in R: How to set the dependent variable as a number of events (rows in dataset)?

I am carrying out GLMMs with glmmTMB, and my dataset contains rows of video analyses (behaviour analyses of recorded videos of deer) and columns of different data (camera id, date, time, behavioural ...
user avatar
1 vote
1 answer
214 views

Interpretation of Positive Count Coefficients in Hurdle Model

What is the proper interpretation of the coefficients for the positive count part of a hurdle model (truncated Poisson or Negative Binomial)? I have read that the interpretation of the coefficients ...
user avatar
  • 45
1 vote
0 answers
20 views

Is Hurdle model recommended if there is a few zero counts?

Is Hurdle model recommended if there is small number of zero counts? Is there any limit for the zero count to fit Hurdle model?
user avatar
3 votes
1 answer
771 views

How to implement a mixed-model with a beta distribution?

I am interested in using a generalised linear mixed model with a response variable (values ranging from 0.001-0.999) that best fits a beta distribution when checked using the 'fitdistrplus' package ...
user avatar
  • 55
0 votes
0 answers
28 views

post-hoc tests for a GLMM with polynomial term

I have count data (winter bud production) from a greenhouse experiment in which 48 plant genotypes were subjected to 4 salinity treatments ranging from low to high salinity. For optimal model fitting ...
user avatar
2 votes
0 answers
261 views

How to correct spatial autocorrelation with glmmTMB when there are several observations on sites?

I have a large dataset of several species' activity parameters during nights and I want to account for spatial autocorrelation (tests and graphs show that my models suffer from it). However, I cannot ...
user avatar
  • 43
5 votes
1 answer
143 views

GLM modeling binomial proportions with varying trials and probabilities

A collection of coin manufacturers, $m$, each produces a line of coins, the number of which varies by manufacturer (some produce 3 types of coins, others make 7, and so on). Each manufacturer imparts ...
user avatar
  • 51
3 votes
1 answer
55 views

Grouping Factor throws model off

One grouping factor of my model appears to pose a problem for model fit. Let me elaborate: I tried to fit a GLMM to ecological data for a behavioural study on termites. I did 80 experiments split ...
user avatar
  • 109
4 votes
0 answers
75 views

Accounting for repeated measures by resampling data and averaging parameter estimates misses the mark, but why?

Let's say I am looking at how unicorn herd size changes with food quantity. Unicorn herd sizes were surveyed at seven localities over the course of twelve months. Food quantity was assessed monthly, ...
user avatar
3 votes
1 answer
813 views

Convergence issues and model selection in glmmTMB

Convergence problems in mixed effect models seem to be a common struggle. It is my understanding that they emerge when the likelihood surface is too flat for the optimisation algorithms to find a ...
user avatar
2 votes
1 answer
123 views

Temporal autoregression in glmmTMB: what do alternative syntax forms mean?

The argument ar1() in glmmTMB accepts two different forms of syntax (that I know of, there might be others): ...
user avatar
3 votes
0 answers
621 views

Varying dispersion parameter (=dispformula) in glmmTMB in R to account for heteroscedasticity that originates from one predictor

I struggle with understanding the dispersion model and dispersion parameter of glmmTMB , and could not find answers anywhere. I constructed a GLMM using ...
user avatar
  • 31
0 votes
0 answers
43 views

Infinite upper and lower CL after fitting the model (glmmtmb)

I am new in GLMM. In my dataset, There are 2 islands, 2 sites were selected (nonrandom) per each island, 6 transects randomly were located on each site, then the number of corals was counted in three ...
user avatar
  • 31
4 votes
1 answer
84 views

Generalized Mixed Model with repeated measurements

I’ve have been working with a mixed model (glmmTMB) to analyse the abundance of snails in dependency of several categorical predictors. The data was measured twice in the same sample sites in two ...
user avatar
  • 41
0 votes
0 answers
160 views

Validation, Interpretation and Post-hoc testing with a zero-truncated GLMM (using glmmTMB, DHARMa and emmeans)

I tried to go as far on my own as I could. But after 6 months of searching and reading, I'm still unsure if everything I did is statistically sound. Unfortunately, I neither have a statistican nor ...
user avatar
0 votes
0 answers
17 views

building a good (mixed) linear model for agri-ecology data [duplicate]

I encountered an problem. I cannot build a good mixed linear model. For example, ...
user avatar
0 votes
0 answers
165 views

Can glmmTMB be used without a random effect?

I'm curious whether glmmTMB can be used without a random effect. Both glmer, lmer, and ...
user avatar
1 vote
0 answers
90 views

Including dispersion parameter in prediction

I have already posted this question on r-sig-mixed-models mailing list but I received no response. I am fitting a ziGamma model using glmmTMB to predict the ...
user avatar
0 votes
1 answer
131 views

When to use Kenward-Roger, not standard glmmTMB

Please consider the following: ...
user avatar
0 votes
0 answers
54 views

How to evaluate overfitting in GLMMs usnig R

I am using glmmTMB in r to model count data. I use poison and negative binomial error distributions. If I add one more predictor to my models I end up having convergence problems. I would like to ...
user avatar
0 votes
0 answers
111 views

Handling 0s in a generalized linear model---climate data

I am using a generalized linear mixed model for analyzing climate data and incidence of a disease variable. The data follows a gamma distribution. But I am getting the following error when I am ...
user avatar
0 votes
2 answers
130 views

glmmTMB: random intercepts vs. spatial random field

I'm working on a modified example from a glmmTMB vignette (found here) using spatial covariance structures. I'm trying to show the difference between "standard&...
user avatar
1 vote
0 answers
352 views

How to report and quantify the random effect in a logistic model? glmmTMB

I'm fitting a logistic regression model with mixed effects using the package glmmTMB. (Because the dataset is very large and lme4 produces out of memory errors). And I need help to interpret and ...
user avatar
  • 874
1 vote
0 answers
288 views

Error in glmmTMB when fitting mixed model with interactions between two categorical variables

my mixed models contain several categorical variables with a lot of unique levels, so model matrix for fixed effects is ​​very sparse. I use glmmTMB package that ...
user avatar
  • 111
0 votes
0 answers
101 views

random effect with one observation per group improves AIC drastically -- explain

Now that I've posted an example (for a different purpose) at How will random effects with only 1 observation affect a generalized linear mixed model? (resulting in creating an account here, and being ...
user avatar
4 votes
1 answer
378 views

Selecting between a zero-inflated binomial, OLRE and beta-binomial model

I need some help in deciding which of the following models fits best the data that I have. This was a survey where participants reported proportions of successes (defined as n/m) in condition A and B. ...
user avatar
  • 1,448
2 votes
0 answers
260 views

How should I deal with spatial autocorrelation in beta GLMM (glmmTMB)? (Bird diversity)

I am trying to compare certain a taxonomic diversity index (for bird communities) calculated for squares in a map grid system (a total of 34 squares) for two different years: 1998 and 2018. My ...
user avatar
  • 91