Questions tagged [glmmtmb]
R package to fit linear and generalized linear mixed models with various extensions, including zero-inflation.
241 questions
0
votes
0
answers
10
views
Statistical Inquiry. Overdispersion issue or abundance of 0s
Trying to go over some data and its half presence absence while the other half is count data. The model I've been working on lately is a mix of lmer and glmer.nb as that seems to be the approach for ...
2
votes
1
answer
25
views
R what is the best glmmTMB model family to fit positively skewed index data
I am attempting to create a linear mixed effects model (lmer) with an positively skewed index dataset (1-4) that results in the best fit (distribution pictured below code).
Database
...
1
vote
1
answer
36
views
R issue with the same random effect variance value (sigma^2) in sjPlot::tab_model() for two separate glmmTMB models
I have two glmmTMB models fit with binomial distributions that I am attempting to display their model summary output using sjPlot::tab_model()
Databases, Models, and tab_model() code
...
0
votes
0
answers
43
views
glmmTMB nbinom1 computing incorrect? coef
I have the fixed effect model (no random effects) glucose ~ genotype, where genotype is a factor with two levels. A quasipoisson and negative binomial GLM should estimate the same coefficients. But, ...
0
votes
0
answers
32
views
GLMM with log-Gaussian, log-Gamma
I need someone smarter than I am to look at this problem, and I'd appreciate it if you'd take the time. So, I am trying to predict reaction times here in a glmm using a battery of IVs. You can see the ...
1
vote
1
answer
42
views
R how best to model continuous bimodal survival data using lmer and glmmTMB that includes values of 0 and 1
I am attempting to model bimodal continuous coral survival data that includes values of 0 and 1 (0-100% survival).
I have attempted to use linear mixed effects models (lmer and glmmTMB) with a few ...
1
vote
1
answer
59
views
Zero inflation: OLS vs Poisson
I am working with a dataset with many zeros in the outcome variables (ranging from 50% to 95% zeros). I am using the glmmTMB package to run zero-inflated Poisson ...
0
votes
1
answer
68
views
Problem with confidence level in GLMM with zero-inflation and zigamma family
I am evaluating which treatment promotes greater root length in a root growth analysis. I have five different treatments, each with four samples, evaluated over nine days across three independent ...
3
votes
1
answer
73
views
DHARMa residual pattern
I'm trying to model a behavior using glmmTMB with a beta distribution (as suggested in another post). My model consists of several fixed factors and two random effects (species and individual). I have ...
2
votes
2
answers
70
views
Is a pseudo R squared of glmmTMB poisson model = 1 possible/does it make sense?
I'm running a number of glmmTMB models on animal behaviour data. For 2 of them, the pseudo R2 are 1 or essentially 1. In my understanding that would mean that the model explains the variance in the ...
1
vote
2
answers
168
views
Residuals of my GLM does not meet the homogeneity of variance assumption
I have ran several generalized linear models on a numeric dependent variable that is likely not normally distributed. I haven't taken ever option available to me so far, but all my models state that ...
3
votes
2
answers
88
views
Using Zero inflated GlMM when you have too many zeros
I am trying to understand the influence of several predictors (n=8) on the presence or absence of a species using generalized linear mixed models. Unfortunately, I do not have great data. I have 13000 ...
0
votes
0
answers
25
views
Improving glmm accuracy - what can I do here?
I'm working on a model in R but my validation suggests it's breaking some assumptions - non-normal residuals and heteroscedasticity. My dependent variable is highly skewed, and originally bounded (but ...
2
votes
1
answer
52
views
Inflated fixed effects in mixed-effects logistic regression model
I have a dataset with multiple observations per ID and a binary outcome. I am trying to fit a mixed-effects logistic regression, however, the fixed effect estimate of the intercept is extremely large ...
1
vote
1
answer
98
views
predict function for glmmTMB
I have the following model:
mod <- glmmTMB(cound_data ~ year-1 +(1|Site), ziformula = ~year-1, data = df, family = "nbinom2"). I am modeling count data ...
4
votes
1
answer
195
views
Use of circular predictor in GLMM
I am developing a mixed-effects binomial logistic regression (using glmmTMB, family = binomial) where the response is presence-absence. One of my potential predictors is hour of day, which takes ...
0
votes
1
answer
49
views
Specifying GLVM with glmmTMB across plots and dates
I'm exploring using glmmTMB to fit a latent variable model to multivariate abundance data according to this vignette. I'm specifically interested in ...
0
votes
0
answers
12
views
Do I need to set contrasts in my model matrix when using the car package for type 3 ANOVA tables?
I have been running several general and generalized linear models (not linear regressions) using glmmTMB and lme4. After I ...
1
vote
1
answer
59
views
Strange output for glmmTMB and pairwise comparison
I am running a glmmTMB to see if there is a significant difference in survival to the eyed egg stage (proportional data between 0 and 1) depending on what genetic male type was used (W, YY, or F1) to ...
6
votes
1
answer
113
views
R: How to calculate power to detect a change in mean beta reg.?
I'm interested in calculating the power to detect a change in my mean response variable by a certain effect size, but I'm not sure how to start. My Y variable is mean plant cover 0-100% cover (mean of ...
1
vote
1
answer
77
views
non-positive-definite Hessian matrix/non-convergence problem with glmmTMB
I've got a dataset that has temperature (21c or 29c), inoculation (mock (m),single inoculations (c or r), or coinoculation (rc)), and age group (y or o). I am trying to model the interactive effects ...
0
votes
0
answers
41
views
GLMM for not so gaussian data
I am having an issue with GLMM and hope you could advice me.
So basically I have data from microscopy experiment of three independent groups (variable: subfolder) nested within 4 experimental ...
1
vote
1
answer
33
views
Fitting random slope for a subject-level predictor
In a nutshell, I am trying to understand whether it makes sense to include random slopes for group-level (or subject-level) predictors in a mixed effects model?
Some Background: I am fitting a mixed ...
3
votes
0
answers
94
views
Including random effect reduces model fit
I am fitting a zero-inflated negative binomial GLMM to model counts. Fixed effects are all categorical except Effort_sq which are non-zero values. The experiment is performed several times within a ...
3
votes
1
answer
87
views
When to include random-effects in zero-inflation model component?
Is it appropriate to specify random-effects (RE) in zero-inflation (ZI) component of the model? My intuition is that whatever RE is appropriate for main component should be appropriate for ZI ...
0
votes
0
answers
30
views
Is it appropriate to calculate odds ratios from random effects glmm output?
Is it appropriate to calculate odds ratios from random effects glmm output?
about the data:
grown (binary): whether flower grows over a certain height (TRUE/FALSE)...
1
vote
1
answer
86
views
Difference between zero-inflated model and zero-altered model
Could someone explain what assumptions I am making (perhaps implicitly) when I specify family = nbinom2() versus ...
0
votes
0
answers
67
views
How to tweak my glmmTMB model to address several items? i.e. covariates, reference levels, random factors, and zero-inflation model
I recently ran a Zero-inflated negative binomial mixed model (ZINB hereafter) using the glmmTMB function from the glmmTMB ...
1
vote
1
answer
36
views
Next steps - variable can't be a fixed and random effect?
I have been trying to run a binomial GLMM on the proportion of emerged seedlings across locations (categorical variable) and over the monitoring period (continous variable). We obtained and planted ...
0
votes
0
answers
64
views
Beta-binomial relationship between dispersion and correlation parameters
Context: I have created a beta-binomial model using glmmTMB() from the glmmTMB package and I am now trying to simulate a beta-...
0
votes
0
answers
90
views
glmmTMB ZINB model non-convergence
I am looking for help with fitting a ZINB model with mixed-effects. The model which I intend to fit contains a random-intercept (three variables/terms denoting the nested, hierarchical group structure)...
0
votes
0
answers
25
views
Addressing Heteroscedasticity in Mixed Effects Models with glmmTMB and DHARMa in R [duplicate]
I am analyzing ecological data in R, where I aim to understand the impact of urbanization on species trends. My response variable is the coefficient of species trends (estimate), and my main predictor ...
3
votes
1
answer
258
views
Addressing Heteroscedasticity in Mixed Effects Models with glmmTMB and DHARMa in R
I am analyzing ecological data in R, where I aim to understand the impact of urbanization on species trends. My response variable is the coefficient of species trends (...
1
vote
0
answers
113
views
What are the assumptions of beta-binomial models, and how do I test for them in r?
I want to model the effects of dispersal distance (disp) and reproductive rate (rep) on colonization rate, quantified as the ...
0
votes
0
answers
191
views
How to deal with under-dispersion in negative binomial GLMM?
I have some animal species. I am interested in seeing what is the relationship between the area they occupy (my response variable, p, which is a count of cells) and ...
0
votes
0
answers
12
views
Non-transformed Log scale response variable in LMM - which distribution to use?
I am currently modelling tea bag index results across different forest "treatments" to infer differences, effect sizes and influence of covariates. One element of these results and a ...
0
votes
0
answers
38
views
glmmTMB for non-regression ecological count data?
Study design: I am analyzing ecological count data for fish in a pre-existing database with observations of fish species abundances(zero_filled). Each species were recorded at a site twice a month of ...
0
votes
0
answers
39
views
Interpreting output from sum constrast model
I have a question following the great response @DaveArmstrong answered in this topic about sum contrast coding.
To first introduce my problem, have a model to account for species richness which is:
<...
0
votes
0
answers
37
views
How to account for relative frequency in a generalized linear mixed model?
I have a dataset of scan sampling done on animals in intervals of 20 minutes. Each observation, an animal is categorized by category 1 (A, B, C, D, or E) and by category 2 (1, 2, 3, or 4). I am trying ...
2
votes
1
answer
84
views
How do I prioritise model diagnostics while considering model selection and parameter uncertainty?
I have fitted a generalized linear mixed model using glmmTMB on the data (110 observations, balanced data) collected from an observational study to understand the ...
2
votes
1
answer
106
views
How to model predicted proportion data without weights
Research Question
I am trying to determine if maternal nest-site choice influences offspring sex ratio in a species where nest temperature determines sex.
Data
I have temperature traces from real nest ...
1
vote
1
answer
228
views
Setting random effect and nested random effect correctly in glmmTMB model
I have been having trouble fitting my data of seedsets of flowers. I have gathered data from seven flowering species in four different elevations. Not all the species appear in every elevation and the ...
1
vote
0
answers
112
views
Power analysis compatible with package glmmTMB
I am trying to conduct a power analysis on the following model:
NativeAntModel <- glmmTMB(NativeAnts~ Treatment + Month +
(1|Site),
data = NativeAntData, family = t_family)
Background on the data: ...
0
votes
1
answer
56
views
Is the GLM a good fit or should I use a non-parametric test?
I have been having trouble interpreting my data of seedsets of flowers. I have gathered data from seven flowering species in four different elevations. Not all the species appear in every elevation ...
1
vote
1
answer
170
views
Analyzing compositional data (sum of proportions = 1) using mixed models with explanatory variables for each proportion
I aim to investigate how the relative abundance of species across communities is associated with the functional traits of each species. For each location ($>250$), I have compositional data that ...
0
votes
0
answers
45
views
Help needed fitting a general latent variable model in glmmTMB
as Ben Bolker suggested here I should ask this question in this forum!
I am trying to fit a GLVM similar to the one presented in this vignette: https://cran.r-project.org/web/packages/glmmTMB/...
0
votes
1
answer
91
views
Fitting a glmmTMB mode with pre-defined coefficients
I'm working on an analysis in which I conducted multimodel inference and model averaging using glmmTMB, which I used for the ordered beta distribution and I would like to stick with. I dredged the ...
4
votes
1
answer
388
views
R: Parameterization differences betwen MASS::glm.nb and glmmTMB "nbinom2"
I'd like opinions on two differing GLM outputs in RStudio.
I model count data (dung pellets) over 21 sites, using quadrats counted as an area offset. I started with a GLM Poisson regression for the ...
0
votes
0
answers
78
views
Calculate the average marginal effect (AME) in the multilevel regression with glmmTMB package
I am writing this message because I want to calculate the average marginal effects (AME) in order to be able to interpret an interaction resulting from a multilevel regression. However, I am finding ...
1
vote
0
answers
33
views
Multilevel model: Contradictory results between multilevel model with interactions and segmented model
I am working on a research paper exploring the differential effect (or interaction) of financialization on the housing conditions of the population according to tenure status. For this purpose, I ...