classify | R Documentation |
Predict probabilities of component membership for a new data set.
classify(object, type = c("mean", "samples"), data = NULL)
object |
An object of class |
type |
Whether to return the posterior means or samples from the posterior. |
data |
A dataframe for which predictions are required. |
For each row in the dataframe data
, predict
p: the posterior predictive probability of membership of the second component (conditional only on the observed covariates in the prediction data set)
p: the posterior probability of membership of the second component (conditional on both the observed response and covariates in the prediction data set)
If type="mean"
the function returns posterior means as a
dataframe, otherwise it returns samples from the posterior as a
list of arrays.
Returns a list or dataframe with elements
p: posterior predictive probabilities of membership of the second component
q: posterior probabilities of membership of the second component
If type="mean"
return a dataframe of posterior means is
returned, and if type="samples"
return a list of arrays of
samples from the posterior.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.