Draws from the posterior predictive distribution of the outcome.
# S3 method for hsstan
predict(object, newdata = NULL, type = NULL, ...)For a binary outcome and type = NULL, a character vector with the
name of the class that has the highest probability for each sample.
For a binary outcome and type = prob, a 2-dimensional matrix with the
probability of class 0 and of class 1 for each sample.
For a continuous outcome a numeric vector with the predicted value for
each sample.
An object of class hsstan.
Optional data frame containing the variables to use to
predict. If NULL (default), the model matrix is used. If specified, its
continuous variables should be standardized, since the model coefficients
are learnt on standardized data.
Option for binary outcomes only. Default NULL will return a
class with the highest probability for each sample. If set to probs, it
will return the probabilities for outcome = 0 and for outcome = 1 for each
sample.
Optional arguments passed to hsstan::posterior_predict
Athina Spiliopoulou