[R] Matching posterior probabilities from poLCA
Rob de Vries
rdevries85 at gmail.com
Mon Aug 3 18:11:10 CEST 2015
Hi all,
I'm a newbie to R with a question about poLCA. When you run a latent class
analysis in poLCA it generates a value for each respondent giving their
posterior probability of 'belonging' to each latent class. These are stored
as a matrix in the element 'posterior'.
I would like to create a dataframe which contains each respondent's unique
ID number (which is stored as a variable in the dataframe used for poLCA)
and their *matched* posterior probability from the 'posterior' matrix. I
would then like to write this dataframe to a csv file for use in another
program.
I know this is possible, but I just can't seem to get it right (blame my
incompetence with R). Any help would be very warmly appreciated.
Best wishes.
Robert de Vries
[[alternative HTML version deleted]]
More information about the R-help
mailing list