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

P value adjustment for pairwise comparisons of negative binomial

Question 1) Am I appropriately doing the pairwise comparisons? Question 2) Why is the Sidak method used for the emmeans? Should I instead use adjust = "none" for these? Context: I have a ...
1
vote
1answer
30 views

Mixed model with random slope but no random intercept?

I have two questions: Is it ok/when might it be ok to specify a mixed model with a random slope but no random intercept? How would one specify such a model in lme4/glmmTMB? I am working on a dateset ...
2
votes
1answer
38 views

Test for equality between two regression coefficients with an interaction term

I’d like to test for equality between two regression coefficients, one of which is an interaction term. I’ve been referencing Andrew P. Wheelers statistics blog: https://andrewpwheeler.com/2016/10/19/...
7
votes
1answer
51 views

Interpreting a zero-inflation negative binomial model

I am currently running a series of zero-inflated negative binomial models on the impact of the magnitude and direction of change in various weather parameters on a number of insect behaviours (...
0
votes
0answers
9 views

getting same AIC (or any other comparison criterion values) even after using different var-cov structures when comparing GLMM models

We are comparing models that are GLMM , in which for each one of them the fixed effects are exactly the same, but in the random effects portion, we used different variance-covariance structures (i.e ...
1
vote
0answers
34 views

Error in a zero-inflated negative binomial model?

Following DHARMa diagnostic tests revealing zero-inflation (ratioObsSim = 32.663, p < 2.2e-16) and over-dispersion ...
1
vote
0answers
34 views

Equation for a glmmTMB model with exponential spatial covariance structure

I have read description of the Spatial covariance structure with glmmTMB on this link (https://cran.r-project.org/web/packages/glmmTMB/vignettes/covstruct.html), ...
0
votes
1answer
25 views

GLMM comparison: likelihood ratio test result is in consistent with the conditional R square result

I am conducting a GLMM with a random slope effect and would like to know if this random slope effect is significant or no. To do this, i did two things, First, compare the full model with the random ...
1
vote
1answer
23 views

How can I calculate standardized weighted residuals 2 for a beta family glmm in R?

Hello and thank you for your time! I’m trying to calculate the "sweighted2" residuals for a beta family glmm with varying dispersion (aka precision parameter aka phi) fit using glmmTMB in R. ...
2
votes
1answer
93 views

glmmTMB: AR1 models fail to converge

I am trying to utilize the first-order autocorrelation [AR(1)] covariance structure abilities of the glmmTMB package (described here by Kasper Kristensen) to model experimental time series data ...
1
vote
0answers
18 views

Why do I not get confidence intervals for interactions using confint with glmmTMB (nbinom2) and REML=TRUE

I run a model where I test the effects of different parameters on the number of individuals (no_ind) in a field experiment. I would like to report the confidence intervals and use confint() which ...
0
votes
0answers
45 views

What is the best method to determine significance in a zero-inflated poisson model?

I am currently trying to run a zero inflated mixed effects model in R using the package glmmTMB following a significant test of zero-inflation (using the function testZeroInflation() in the package ...
0
votes
1answer
96 views

GLMM hurdle model for continuous data -Truncated negative binomial family in glmmTMB?

I am running a hurdle model using the glmmTMB function. My dependent variable is continuous and >= 0. I was looking for a function that would allow me to model the binary response in a logistic ...
0
votes
1answer
105 views

leverage() diagnostic test not supported for glmmTMB models in r

I am using a glmmTMB to look at the effect of numerous variables on how far individuals travel (distance). The example below is ...
1
vote
0answers
59 views

Which model and distribution to use to fit continuous proportional data with random effects; glmmTMB, glmer, lme? I am getting errors with all 3

I am having trouble determining the most appropriate model to fit my continuous proportional data. I am analysing the proportion of time individuals were detected within an acoustic receiver array ...
1
vote
0answers
23 views

Preparing **probabilities** data for mixed effect modeling

I have two related problems i cant seem to find an online solution and would really appreciate any direction. I am modeling probabilities* as a function of different predictors, across 35 subjects. X1 ...
0
votes
1answer
63 views

How to get p-values for the zero-inflated part of a model?

I am having a problem that I am not finding an answer anywhere online. I used glmmTMB to fit a mixed-model. My data is zero-inflated and I am including 3 variables in the zero-inflated formula. I was ...
1
vote
0answers
68 views

Interaction term alters degrees of freedom for main effects in glmmTMB model

I am using the glmmTMB package to test whether the probability of a seed remaining dormant in the soil (binary variable) depends on the population it comes from (fixed effect, 8 levels of population), ...
1
vote
0answers
27 views

How to calculate predicted probability for each level of a random effect?

I've specified a generalized linear mixed effect model (using glmmTMB) with success of taking a seed as the response variable (Yes/No). Individual id is specified as a random effect because each ...
0
votes
1answer
65 views

interpreting residual plots for zero-inflated linear mixed model

I am modelling a behavioural response (i.e., # times behaviour was observed/time observed [no longer an integer value]) in relation to disturbance levels (continuous) and the health status of the ...
0
votes
0answers
40 views

Gaussian or Negative Binomial in glmmTMB

The Background: I'm working with a dataset that had randomization error at baseline; the methodology was solid, the PI was just unlucky. It's a three-level model (time within individual responses ...
2
votes
1answer
135 views

DHARMa diagnostics show significant deviations in KS tests for a glmm with beta distribution

I'm trying to use glmmTMB to fit a beta-distributed generalized mixed effects model with nested random effects. DHARMa residual diagnostics show a KS test with significant deviation. Is this serious ...
1
vote
1answer
398 views

interpreting output for glmmTMB for zero-inflated count data

I have been trying to read all the documentation I have, but I'm still not sure what the difference is between the "conditional" and zero-inflated models in the output of the glmmTMB. Below is some ...
0
votes
0answers
45 views

Large standard error of intercept and low overdispersion parameter from negative binomial hurdle model using glmmTMB

I am running hurdle models on some count data using the R package glmmTMB. For one of my models, I tried the "truncated_nbinom1" family, but this model fails to converge. When I use the family "...
1
vote
1answer
73 views

GLMM: Define zero inflation varying across sites

I am fitting a glmm for count data as follow: ...
1
vote
1answer
78 views

Model Selection- Poisson and Negative Binomial

I have run 2 GLM models with same variable specifications except that one was run with the response variable following a generalized poisson distribution and the other with a negative binomial ...
1
vote
0answers
12 views

Interpretation of interactions in inverse gamma glmm

i want to calculate the effects that the interaction between zone (4 levels), species (2 levels) and distance from contact zone (continuous) has on the pulse repetition period - song rate of the two ...
0
votes
0answers
57 views

Emmeans & effects packages: Post-hoc tests for Tweedie glmmTMB model

Are there any problems with using the effects and emmeans packages to interpret glmmTMB models with Tweedie distributions? I have glmmTMB models using the Tweedie distribution, and I want to draw ...
2
votes
0answers
43 views

I have a proportion DV with true 0 and 1. Which mixed modelling approach (in R) is most recommend?ed?

Hope this isn't too much of a dumb question. I've been searching for a definitive answer, and now I've got choice paralysis. I have a proportional DV (accuracy) with true 0 and 1 values averaged for ...
0
votes
1answer
77 views

Confused about over dispersion for my beta distribution

I have percentage data so I am using a beta distribution and I want to do a mixed-effect model so I am still trying to decide between glmmTMD or the brm packages. I saw somewhere that some ...
0
votes
0answers
89 views

What to do when you have significant autocorrelation in a glmmTMB logistic regression model (easily reproducible code provided)?

I have significant autocorrelation apparent from acf and pacf plots of a binomial GLM. My question is how can I solve this ...
0
votes
0answers
8 views

Avoiding potential for over estimating rates of small counts in zero-inflated poisson

Fitting glmms I have encountered cases where zero-inflated Poisson models drastically over-estimate rates for response variables with very low counts despite being the better fit. Is there a an ...
1
vote
0answers
101 views

Mixed effect zero inflated negative binomial model in R: use of Dharma package, glmmTMB and glmmAdaptive

I am having trouble fitting a mixed effect zero inflated negative binomial model to my data using the GLMMadaptive package: negbi_1 <- mixed_model(fixed=MA ~ ST + AG + SU +SO +Y, ...
0
votes
1answer
47 views

Zero offset values, glmm poisson/negative binomial distribution with

I have a data set that consists of video observations of carpenter bee nests under three treatments: a control, mothers removed and mothers and worker removed. I have counts of twenty behaviours as ...
1
vote
0answers
19 views

Buld prediction intervals for glmmTMB

I'm using glmmTMB to build a mixed effect logistic model from which I want to draw predictions. The predict() function applied to a glmmTMB model allows extracting the ML prediction and the relative ...
0
votes
1answer
47 views

Mispecified random effects in mixed model

This is a simplified example of my model formula: Response ~ Treatment * Condition + (1|Plot/sublot) Treatment and Condition have 2 levels each, (say A/B and a/b)...
0
votes
0answers
31 views

Offsets variable subjects and behaviors

I have a set of behavioural data. It consists of about 600+ 50 mins long observations within 35 different bee nests, with many different numbers of observations per nest, and variable numbers of bees ...
1
vote
0answers
34 views

Issues with Conway Maxwell Poisson Family in glmmTMB

I'm having issues running the the Conway Maxwell Poisson family (compois) in glmmTMB. I have under dispersed data (0.5). I am running a mixed model. 3 predictor variables, 2 random effects, n=1000. ...
0
votes
0answers
25 views

Bootstrapped interpolated values from a model in glmmTMB?

Is there a way to bootstrap interpolated values from a model in glmmTMB? After I have fit a GLMM I like to interpolate known response values into the model using a modified version of Venables' ...
1
vote
0answers
34 views

Specification of AR1 correlation structure for multilevel zero-inflated Poisson model with sparse outcome

I am trying to specify an AR1 correlation structure for a multilevel zero-inflated Poisson model using glmmTMB. A sample of the ...
1
vote
1answer
140 views

Diagnostic plot (residual vs. predicted) of a glmm using DHARMa

I used glmmTMB to fit a model with beta distributed errors, zero inflation, several nested random effects and temporal correlation. I then used the diagnostic plots available in DHARMa. My residual vs ...
0
votes
0answers
28 views

PIT histogram for multilevel model

I realized a poisson multilevel analysis with randon effects, using the package glmmtmb, and now I'd like to check the adjustment with PIT histogram Is there any ...
4
votes
1answer
226 views

crossed random effects with autoregression, glmmTMB

I am working on data that have crossed random effects as well as a autoregressive covariance structure. I would like to check if there is something unlogical about my approach, as the model I would ...
0
votes
0answers
54 views

Plotting slopes and 95% confidence intervals with the effects package

I'm having some trouble getting the effects package to make the graph I want. I'm using the predictorEffects function to generate predictions for the effect of two 2-level factors (species & ...
0
votes
0answers
81 views

P-value of 1 and parametric bootstrap for random effects in glmmTMB

I am running mixed models in glmmTMB, and I'm using likelihood ratio tests to test the significance of my random effects. Mostly this is working fine, but in some cases the LRT gives me a p-value of 1 ...
2
votes
0answers
118 views

OLRE's vs. Beta Binomial Model for Overdispersed Mixed Effect logistic regression with proportion data?

this is a long post, as I wanted to be sure to provide all relevant information regarding my data, model, the methods that I have tried so far, and my diagnostic plots. If there are ways I should ...
2
votes
1answer
147 views

Is setting a certain covariance structure between random effects and zeroing R equivalent to setting this structure exclusively in residual matrix?

I'm wondering whether setting, say, a compound symmetry covariance structure between random effects and setting the residual covariance to 0 is effectively the same as not using the random effects G ...
1
vote
0answers
171 views

Is this possible to fit a MMRM (SAS REPEATED) with compound symmetry or AR1 model with glmmTMB?

MMRM (Mixed effect Model Repeat Measurement) models are special cases of the mixed models, where no random effects are used, only the residual covariance is modelled. This is commonly used for ...
3
votes
0answers
313 views

Understanding AR1 through the glmmTMB package

I've been working through a reproducible example to better understand AR1 covariance matrix using the glmmTMB package. I have a couple of questions, even if only ...
6
votes
1answer
271 views

Interpreting random effects in zero-inflated models

For context, I have a longitudinal study measuring counts of bacterial sequences in human stool collected during a dietary intervention. Initially, I was going model the change in each bacterium (...