reorder.glca {glca} | R Documentation |
Function for reordering the estimated parameters for glca
model.
## S3 method for class 'glca' reorder(x, ..., class.order = NULL, cluster.order = NULL, decreasing = TRUE)
x |
an object of " |
... |
further arguments passed to or from other methods. |
class.order |
a integer vector of length equal to number of latent classes of the glca model, assigning the desired order of the latent classes |
cluster.order |
a integer vector of length equal to number of latent clusters of the glca model, assigning the desired order of the latent clusters |
decreasing |
logical, when the |
Since the latent classes or clusters can be switched according to the initial value of EM algorithm, the order of estimated parameters can be arbitrary.
lca = glca(item(DEFECT, HLTH, RAPE, POOR, SINGLE, NOMORE) ~ 1, data = gss08, nclass = 3, na.rm = TRUE) plot(lca) # Given ordering number lca321 = reorder(lca, 3:1) plot(lca321) # Descending order dec_lca = reorder(lca, decreasing = TRUE) plot(dec_lca) # Ascending order inc_lca = reorder(lca, decreasing = FALSE) plot(inc_lca)