View source: R/postClassProbs.R
postClassProbs | R Documentation |
The posterior class probabililities for each observed pattern and class is determined. These are returned as a data frame together with the patterns for each observation. If class = 0 is requested then all classes are returned, otherwise only the selected class.
postClassProbs(object, class = 0)
object |
randomLCA object |
class |
class to be returned. Zero returns all classes. |
Extracts the corresponding data from the randomLCA object.
A data frame. The first columns of the data frame correspond to the patterns, followed by the frequency of each pattern, and then the posterior class probabilities for either the selected class or for all classes. The returned result is for the summarised data. If raw data is used, that is no frequencies, and it is required to calculated the posterior class probability for each observation then it is simply required to merge the class probabilities with the raw data, possibly removing any variable "freq" in the raw data.
Ken Beath
pap.lca2 <- randomLCA(pap[, 1:10], freq = pap$Freq, nclass = 2, cores = 1)
print(postClassProbs(pap.lca2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.