```Date: Tue, 1 Dec 2009 02:43:49 -0800 Reply-To: Ryan Sender: "SAS(r) Discussion" From: Ryan Organization: http://groups.google.com Subject: Re: Latent Class Analysis - Question Comments: To: sas-l@uga.edu Content-Type: text/plain; charset=ISO-8859-1 On Dec 1, 2:48 am, Oliver Kuss wrote: > On 1 Dez., 02:16, Ryan wrote: > > > > > > > Hi, > > > Let me apologize in advance for asking the same question twice. I > > figured I'd give it another shot. > > > Has anyone seen/developed code to run a random effects latent class > > analysis in SAS. Let's say we have three dichotomous indicator > > variables (0=No, 1=Yes) that we hypothesize load on a latent class > > variable (with 3 classes). > > > A simple example I just made up: We suspect that there are three > > classes of people who use illicit substances (class 1 = non-users/ > > abstainers, class 2 = casual users, class 3 = addicts). Assume we > > cannot measure directly if someone belongs to any of these classes, > > but we have 3 indicator variables as indicated previously. Let's also > > assume that we have two cases per person (measured at equal > > intervals)... > > > /----------------------------------------------/ > > Person Time X1 X2 X3 > > 1 1 0 1 1 > > 1 2 1 0 1 > > 2 1 0 0 0 > > 2 2 0 0 1 > > . > > . > > > N > > /----------------------------------------------/ > > > Does anyone know how to construct code (presumably in nlmixed) to run > > a random intercept LCA and compute the following: > > > (1) Probability that a positive response on each item is associated > > with a particular class > > (2) Probability that each case is associated with a particular class > > (3) Any indication that the number of classes we selected does not > > yield the best fitting model. I assume re-running the model assuming 2 > > classes, 4 classes, etc. and comparing AICs/BICs might work. > > > Any thoughts/recommendations/references would be great. > > > Thanks, > > > Ryan > > Dear Ryan, > it seems that you also have a longitudinal structure in your data set > with two (or even more) observations for each person. Then you should > definitely look at PROC TRAJ (http://www.andrew.cmu.edu/user/bjones/), > a user-written SAS prodecure that fits discrete mixture models to > longitudinal data. I once worked with it and it did fine. Before final > publication of the results I also coded the model with PROC NLP and it > yielded the same results. So you might also use PROC NLP or PROC > NLMIXED for latent class models. > > Hope that helps, > Oliver- Hide quoted text - > > - Show quoted text - Thanks for responding, Oliver. Thank you for the info about TRAJ procedure. I would prefer to run the model using the NLMIXED procedure. I assume it is possible to run such a model as evidenced by a post by Dale a while back: http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0503a&L=sas-l&D=0&P=26375 What's confusing to me about Dale's post is the dependent variable. What exactly would be the dependent variable in an LCA such as the example I made up? Ryan ```

Back to: Top of message | Previous page | Main SAS-L page