0
$\begingroup$

I am conducting a multilevel laten class analysis using the R package multilevLCA. I have fitted the model using multiple steps (i.e. determining optimal number of classes as well as clusters). I now want to extract the Posterior lower-level class assignment for lower-level units after marginalization over the higher-level classes (proportional assignment) using the mPMsumX command. I can extract it as a dataframe, but I can't seem to fit/add a unique identifier to it, so it's impossible to merge it to my dataset afterwards. I feel like I am missing something very basic, but have tried everything I know, but without results so far. The rows in the extracted dataframe are not in the same order as my orginal dataset used to derive the model (so simply adding a row number as ID won't work).

Can somebody point out what I am missing here?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.