33 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
55
views
Any known changes to glmmTMB since 2023 that would alter model fit?
I used glmmTMB to run GLMMs with a beta distribution to evaluate the proportion of time an animal spends doing a behavior. My observations were of different lengths, and I weighted the observations ...
0
votes
1
answer
2k
views
Error in glmmTMB after Matrix update: negative log-likelihood is NaN at starting parameter values
I'm modeling camera trap data (counts) with camera site as a random effect and landscape-level covariates + season as fixed effects, and an offset for number of days the camera station was active, as ...
6
votes
1
answer
10k
views
Error in fitTMB(TMBStruc) : negative log-likelihood is NaN at starting parameter values
I have some data on Drosophila developmental time. I'm running it against treatment with vial specified as a random effect, as described below:
model_tddVZ <- glmmTMB(age ~ treatment + (1|vial), ...
1
vote
0
answers
152
views
Possible bias when fitting linear regression with errors in variables using TMB
I am new to template model builder (TMB), and I am trying to use it to fit a simple linear regression with errors in variables as a learning exercise. My ultimate goal is to apply this to more complex ...
2
votes
0
answers
146
views
Using splines in TMB models
I have a nonlinear mixed-effects model that I have implemented in nlme that I would like to implement in TMB to decrease computation times and hopefully some occasional convergence issues.
In its ...
0
votes
0
answers
67
views
Is there a method for importing a R formula into TMB cpp
I would like to import into TMB a user formula that is used as the prediction equation in a likelihood function.
Is there any way of doing this? Could you point me to a relevant example? Any help ...
1
vote
1
answer
228
views
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
votes
1
answer
110
views
How to make compiled TMB C++ code portable among platforms
I've been following the link (Guidelines for including TMB c++ code in an R package) to include a .cpp TMB model into my R package (fishmethods).
I got it to work on Windows using a Makefile.win file ...
2
votes
1
answer
191
views
Why am getting the following error when adjusting a glmm with the "glmmTMB" function and I try to obtain the confidence intervals?
I am trying to run the following model:
Mm3znb<-glmmTMB(total~ Geopolitical-1 + offset(logha) + YearCollected + tmn + (tmn|Site/Plot), ziformula = ~1, data = mc3m, family="nbinom2")
but ...
1
vote
1
answer
1k
views
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(...
0
votes
0
answers
188
views
Interfacing C, C++ codes in a new R package
Recently, I am creating a new R package with Rcpp for my project including Vines and Local Likelihood estimation with some C files. I created my own functions, collect previously written ones and try ...
1
vote
1
answer
381
views
How to do a matrix * vector multiplication and pass this result to a vector in TMB in R?
I need to do a matrix * vector multiplication, which generates only a single number, and pass it to a vector (but it doesn't work in the commented code below). What I have so far is:
cpp code
#...
0
votes
1
answer
358
views
Error in MakeADFun(... 'data' must be a list after calling `TMB::sdreport()`?
After I call the sdreport function, I get an unexpected error: Error in MakeADFun(obj$env$data, obj$env$parameters, type = "ADFun", ADreport = TRUE, : 'data' must be a list which is strange, ...
1
vote
0
answers
392
views
How to debug my .cpp file using `gdbsource` function in TMB in R?
I am writing to implement a Simplex regression in this file (simplex_reg.cpp):
// Simplex Regression
#include <TMB.hpp>
template<class Type>
Type objective_function<Type>::operator()...
0
votes
0
answers
135
views
How to include a different probability distribution in TMB in R?
I am using the TMB package in R, and I want to use a density distribution which is not available in the R style distribution.
How should I include it? I didn't find anything in the documentation.
...