Better default behavior for sdreport when using bias.correct=TRUE without any random effects
Reproducible Steps:
In tinyVAST, users get a cryptic error when using bias.correct=TRUE in a model without random effects. This can be traced to default behavior in sdreport as shown here:
Error in obj$env$spHess(random = TRUE) : attempt to apply non-function
Expected Output:
Personally, I think it might be nice to have an informative error in sdreport, or even just replacing the epsilon-method output with standard delta-method output in the absence of any random effects (which is presumably what is intended by the estimator in that instance).
Description:
Better default behavior for
sdreport
when usingbias.correct=TRUE
without any random effectsReproducible Steps:
In
tinyVAST
, users get a cryptic error when usingbias.correct=TRUE
in a model without random effects. This can be traced to default behavior insdreport
as shown here:Current Output:
Expected Output:
Personally, I think it might be nice to have an informative error in
sdreport
, or even just replacing the epsilon-method output with standard delta-method output in the absence of any random effects (which is presumably what is intended by the estimator in that instance).TMB Version:
‘1.9.15’
R Version:
4.4.1
Operating System:
Windows