Skip to content

Visreg #332

Answered by seananderson
Nathan-Hebert asked this question in Q&A
Discussion options

You must be logged in to vote

It would be turning them off / setting them to zero. I.e. setting re_form = NA in predict.sdmTMB.

sdmTMB/R/predict.R

Lines 954 to 968 in 1dc2801

check_visreg <- function(sys_calls) {
visreg_df <- FALSE
re_form <- NULL
se_fit <- FALSE
if (any(grepl("setupV", substr(sys_calls, 1, 7)))) {
visreg_df <- TRUE
re_form <- NA
if (any(sys_calls == "residuals(fit)")) visreg_df <- FALSE
# turn on standard error if in a function call
indx <- which(substr(sys_calls, 1, 10) == "visregPred")
if (length(indx) > 0 && any(unlist(strsplit(sys_calls[indx], ",")) == " se.fit = TRUE"))
se_fit <- TRUE
}
named_list(visreg_df, se_fit, re_…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nathan-Hebert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants