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
0
votes
1 answer

Error: package or namespace load failed for ‘glmmTMB’

I am trying to use package glmmTMB. When I call library(glmmTMB) this is the error message: ">library(glmmTMB) Error: package or namespace load failed for ‘glmmTMB’ in inDL(x, as.logical(local), as.logical(now), ...): function…
0
votes
1 answer

How do you incorporate random effects with interactions?

I am looking for advice on the proper model notation to test for differences between sex in my data. My goal is to determine whether or not I need to split my data into M and F, or if I can keep my data combined (I hope that I will be able to keep…
bruss
  • 21
  • 3
0
votes
1 answer

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 animals sampled at that particular beach and…
Lisa
  • 21
  • 1
0
votes
0 answers

How to code great circle distances into glmmtmb mixed effect model?

I am trying to run a mixed effect model using the 'glmmtmb' package with a spatial covariance structure that accounts for distances between points on a sphere. I have dug into the source code and identified where I think they calculate the Euclidean…
Leo Ohyama
  • 887
  • 1
  • 9
  • 26
0
votes
0 answers

Interpretation of glmmTMB with dispersion parameter in R

I struggle with understanding the dispersion model and dispersion parameter of glmmTMB , and could not find answers on github, in the vigniette or on stackexchange/stackoverflow. I constructed a GLMM using glmmTMB with a dispersion paramenter to…
eab
  • 1
0
votes
0 answers

Errors - bootstrap GLM model - glmmBoot package

I'm trying to run a bootstrap resampling on a GLM model, but I keep running into errors and I can't find any solution online. The first problem in which I ran into is "variable lenght differs" when i try to use a normalized variable (sub.size_z) and…
Fabrizio
  • 13
  • 5
0
votes
0 answers

glmmTMB warning message

I want to run the following model: mod.1 <- glmmTMB(Step ~ Parasitised*Mixed*Week + (1|Animal.ID/Group) + (1|Logger.ID) +(1|Plot), data = data.df, family = nbinom1, …
alex
  • 153
  • 1
  • 10
0
votes
1 answer

Specifying truncation point in glmmTMB R package

I am working with a large dataset that contains longitudinal data on gambling behavior of 184,113 participants. The data is based on complete tracking of electronic gambling behavior within a gambling operator. Gambling behavior data is aggregated…
André
  • 101
  • 4
0
votes
0 answers

R Incorrect Number of Dimensions Error from data.frame Assignment

When running the code below I get the error: Error in data[, 4] : incorrect number of dimensions Both data[,4] and goals have the same length (480) so I don't understand what the issue is. Data is a data.frame with 4 columns and goals is a length…
user9231414
0
votes
0 answers

r program bayes.glmm giving an error Error in prep_call_sampler(object)

I am running bayes.glmm r package but it is giving an error: data("sample", package = "bayes.glmm") pheno = data$pheno geno = data$geno cov = data$cov L <- t(chol(data$K)) mymodel = stan_models(model = "glm", auto_write = TRUE) y2 =…
0
votes
0 answers

glmmTMB model size with saveRDS

Modelling with glmmTMB produces modelling objects that become unwieldy to work with because of their size after saving to RDS. Another thread suggested for lm objects this problem arises from environment attributes that seem to come along for the…
user1658170
  • 814
  • 2
  • 14
  • 24
0
votes
0 answers

How do I calculate the effect size of a fixed effect in a negative binomial mixed effect model?

I am examining a certain fixed effect (effect3 here) by fitting two negative binomial mixed models using the glmmTMB function: one with and one without the fixed effect. Next, I perform a likelihood ratio test to test the significance of effect3…
Friedebert
  • 11
  • 2
0
votes
1 answer

Odds and Rate Ratio CIs in Hurdle Models with Factor-Factor Interactions

I am trying to build hurdle models with factor-factor interactions but can't figure out how to calculate the CIs of the odds or rate ratios among the various factor-factor combinations. library(glmmTMB) data(Salamanders) m3 <- glmmTMB(count ~ spp +…
0
votes
1 answer

Possible to calculate predicted probabilities for each random effect level?

I've run a generalized linear mixed model with a binomial distribution with success of taking a seed as the response (Yes/No). Individual id is a random effect. Is it possible to not just calculate predicted probabilities based on the fixed effects…
Rachael
  • 33
  • 7
0
votes
1 answer

GlmmNP package gives me errors

I am new to glmm. I require it to fit a model that takes into account bees fed on two pollen treatments, placed in different cages, and their weight recorded on a daily basis. The question I seek to address is whether the weight of the bees varies…
1 2 3
9
10