Hi,
I've tried to reorder the classes without success. The first time I run poLCAParallel::poLCA() I seem to get the message "ALERT: error in user-specified starting values; new start values generated" even though I did not specify any starting values. I think that this is contributing to the error. In any case, the following code does not seem to reorder the classes in descending order as I would expect it to.
model_4 <- poLCAParallel::poLCA(
formula,
data,
nclass = 4,
nrep = 10,
verbose = FALSE,
na.rm = FALSE
)
model_4
model_4$probs.start
probs.start.new <- poLCAParallel::poLCA.reorder(model_4$probs.start, order(model_4$P, decreasing=TRUE))
model_4 <- poLCAParallel::poLCA(
formula,
data,
nclass = 4,
nrep = 10,
probs.start = probs.start.new,
verbose = FALSE,
na.rm = FALSE
)
model_4
model_4$probs.start
However, if the poLCAParallel:: prefix is replaced by poLCA:: throughout, then this code does work as expected and reorders the classes from largest (class 1) to smallest (class 4). Could you help with reordering classes? Thanks!
Hi,
I've tried to reorder the classes without success. The first time I run
poLCAParallel::poLCA()I seem to get the message "ALERT: error in user-specified starting values; new start values generated" even though I did not specify any starting values. I think that this is contributing to the error. In any case, the following code does not seem to reorder the classes in descending order as I would expect it to.model_4 <- poLCAParallel::poLCA(
formula,
data,
nclass = 4,
nrep = 10,
verbose = FALSE,
na.rm = FALSE
)
model_4
model_4$probs.start
probs.start.new <- poLCAParallel::poLCA.reorder(model_4$probs.start, order(model_4$P, decreasing=TRUE))
model_4 <- poLCAParallel::poLCA(
formula,
data,
nclass = 4,
nrep = 10,
probs.start = probs.start.new,
verbose = FALSE,
na.rm = FALSE
)
model_4
model_4$probs.start
However, if the
poLCAParallel::prefix is replaced bypoLCA::throughout, then this code does work as expected and reorders the classes from largest (class 1) to smallest (class 4). Could you help with reordering classes? Thanks!