classify: Predicted Probabilities of Component Membership

Description Usage Arguments Details Value

Description

Predict probabilities of component membership for a new data set.

Usage

1
classify(object, type = c("mean", "samples"), data = NULL)

Arguments

object

An object of class bmixlm

type

Whether to return the posterior means or samples from the posterior.

data

A dataframe for which predictions are required.

Details

For each row in the dataframe data, predict

If type="mean" the function returns posterior means as a dataframe, otherwise it returns samples from the posterior as a list of arrays.

Value

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.


SWotherspoon/bmixlm documentation built on May 9, 2019, 12:07 p.m.