slca
ObjectProvides predicted class memberships or posterior probabilities for new data based on a fitted slca
model.
# S3 method for slcafit
predict(object, newdata, type = c("class", "posterior"), ...)
A data.frame
or list
depending on the type
:
For type = "class"
, a data.frame
is returned where rows represent observations and columns correspond to latent class variables.
For type = "posterior"
, a list
is returned containing data.frame
s with posterior probabilities for each latent class variable.
An object of class slcafit
, representing a fitted slca
model.
A data.frame
containing the same variables as those used to estimate the object
.
A character string indicating the type of prediction. Use "class"
to obtain the predicted class membership for each observation and latent class variable, or "posterior"
to retrieve posterior probabilities for each class. The default is "class"
.
Additional arguments passed to other methods.