Predict using basset
# S3 method for bassetfit
predict(
object,
newdata,
response = "Lambda",
size = NULL,
use_names = TRUE,
summary = FALSE,
iter = NULL,
from_scratch = FALSE,
...
)
(if summary==FALSE) array D x N x iter; (if summary==TRUE) tibble with calculated posterior summaries
An object of class pibblefit
An optional matrix for which to evaluate prediction.
Options = "Lambda":Mean of regression, "Eta", "Y": counts
the number of counts per sample if response="Y" (as vector or matrix), default if newdata=NULL and response="Y" is to use colsums of m$Y. Otherwise uses median colsums of object$Y as default. If passed as a matrix should have dimensions ncol(newdata) x iter.
if TRUE apply names to output
if TRUE, posterior summary of predictions are returned rather than samples
number of iterations to return if NULL uses object$iter
should predictions of Y come from fitted Eta or from predictions of Eta from posterior of Lambda? (default: false)
other arguments passed to summarise_posterior
currently only implemented for pibblefit objects in coord_system "default" "alr", or "ilr".