-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Very useful package. I have a minor suggestion: in add_pi
(and possibly other functions - I haven't checked), an error is thrown if tb
does not include a column for the response variable. The actual values in the column are ignored, but the column has to be present. I'd guess this is due to some internal code similar to:
X <- formula(fit) %>% model.matrix(data = tb)
used to get the design matrix for simulation-based prediction intervals. Using a few more steps should eliminate the need to include the response. Something like:
chr_formula <- formula(fit) %>% deparse() %>% strsplit(' ') %>% getElement(1)
X <- as.formula(chr_formula[-1]) %>% model.matrix(data = tb)
I noticed this specifically with a Poisson GLM. add_ci
did not require the response to be in tb
.