2018_FSH556 icon indicating copy to clipboard operation
2018_FSH556 copied to clipboard

Optimizer Error for random = NA

Open ciallen opened this issue 6 years ago • 1 comments

I noticed setting random = NA (for the first model) results in the error (only when trying to optimize): TMB as received an error from Eigen. index>=0 && index < size()

I removed the random call from the makeADFun() function, and then the optimizer runs fine. Do you always need a value for random when using it in the makeADFun() call?

ciallen avatar Apr 16 '18 17:04 ciallen

if you do args(TMB::MakeADFun) you'll see that the default is random=NULL. Therefore, if you have a model without any random effects, you can either not include anything for slot random or equivalently fix random=NULL

James-Thorson avatar Apr 16 '18 18:04 James-Thorson