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]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.