predict.hsstan {nestedcv} | R Documentation |
Predict from hsstan model fitted within cross-validation
Description
Draws from the posterior predictive distribution of the outcome.
Usage
## S3 method for class 'hsstan'
predict(object, newdata = NULL, type = NULL, ...)
Arguments
object |
An object of class |
newdata |
Optional data frame containing the variables to use to
predict. If |
type |
Option for binary outcomes only. Default |
... |
Optional arguments passed to |
Value
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.
Author(s)
Athina Spiliopoulou