poLCA_result | R Documentation |
poLCA::poLCA
.you get a result table for reporting with the other functions like poLCA_check_class
or poLCA_BLRT
.
poLCA_result(
formula,
data,
nclass,
maxiter = 5000,
nrep = 1,
reorder_with = "class prop",
reorder_outcome = 1,
reorder_decreasing = TRUE,
verbose = TRUE
)
formula |
a formula object directly passed to |
data |
a data frame. |
nclass |
a numeric vector of number of latent class to estimate. For example, if you want to estimate 2 class model to 5 class model for comparing model fitting of them, input |
maxiter |
The maximum number of iterations through which the estimation algorithm will cycle. |
nrep |
Number of times to estimate the model, using different values of probs.start. The default is one. Setting nrep>1 automates the search for the global—rather than just a local—maximum of the log-likelihood function. poLCA returns the parameter estimates corresponding to the model with the greatest log-likelihood. |
reorder_with |
'class_prop' or one variable name. If 'class_prop', the order of latent class is determined by the proportion of each class. If one variable name, the order of latent class is determined by the conditional probability of the variable. The default is 'class_prop'. |
reorder_outcome |
a numeric value of a category of manifest variable. You can reorder latent classes with reference to the category of manifest variable. You must specify a manifest variable in |
poLCA::poLCA()
# example data
data('carcinoma', package = 'poLCA')
# estimate 2 class model to 3 class model
result <- poLCA_result(
formula = as.matrix(carcinoma) ~ 1,
data = carcinoma,
nclass = 2:3,
maxiter = 6000,
nrep = 1,
verbose = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.