From: Ryan on 30 Nov 2009 20:16 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
From: Oliver Kuss on 1 Dec 2009 02:48 On 1 Dez., 02:16, Ryan <ryan.andrew.bl...(a)gmail.com> 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
From: Ryan on 1 Dec 2009 05:43 On Dec 1, 2:48 am, Oliver Kuss <Oliver.K...(a)medizin.uni-halle.de> wrote: > On 1 Dez., 02:16, Ryan <ryan.andrew.bl...(a)gmail.com> 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
From: Oliver Kuss on 1 Dec 2009 09:15 On 1 Dez., 11:43, Ryan <ryan.andrew.bl...(a)gmail.com> wrote: > On Dec 1, 2:48 am, Oliver Kuss <Oliver.K...(a)medizin.uni-halle.de> > wrote: > > > > > > > On 1 Dez., 02:16, Ryan <ryan.andrew.bl...(a)gmail.com> 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- Zitierten Text ausblenden - > > - Zitierten Text anzeigen - Dear Ryan, I got your point. I admittedly do not know how such a model can be coded with PROC NLMIXED but I have two more hints which might be useful: 1. There is a SUGI paper using PROC CATMOD (http://www2.sas.com/ proceedings/sugi31/201-31.pdf) for LCA and 2. There is a user-written SAS procedure LCA (http://methodology.psu.edu/index.php/downloads/ proclcalta) whose first example has four binary indicators which should be grouped in two classes (similar to your problem, without a "response"). Maybe you can use PROC LCA for achieving the results for your data set and then use the description of the model in the PROC LCA handbook for translating the model into PROC NLMIXED. Yours, Oliver
From: Ryan on 1 Dec 2009 10:23 On Dec 1, 9:15 am, Oliver Kuss <Oliver.K...(a)medizin.uni-halle.de> wrote: > On 1 Dez., 11:43, Ryan <ryan.andrew.bl...(a)gmail.com> wrote: > > > > > > > On Dec 1, 2:48 am, Oliver Kuss <Oliver.K...(a)medizin.uni-halle.de> > > wrote: > > > > On 1 Dez., 02:16, Ryan <ryan.andrew.bl...(a)gmail.com> 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- Zitierten Text ausblenden - > > > - Zitierten Text anzeigen - > > Dear Ryan, > I got your point. I admittedly do not know how such a model can be > coded with PROC NLMIXED but I have two more hints which might be > useful: > 1. There is a SUGI paper using PROC CATMOD (http://www2.sas.com/ > proceedings/sugi31/201-31.pdf) for LCA and 2. There is a user-written > SAS procedure LCA (http://methodology.psu.edu/index.php/downloads/ > proclcalta) whose first example has four binary indicators which > should be grouped in two classes (similar to your problem, without a > "response"). Maybe you can use PROC LCA for achieving the results for > your data set and then use the description of the model in the PROC > LCA handbook for translating the model into PROC NLMIXED. > > Yours, > Oliver- Hide quoted text - > > - Show quoted text - Who knew there were so many SAS procedures that could handle an LCA model?! I will certainly try to run it (without the REs) using one of these other procedures. Regardless, however, if I want to run a random effects LCA in SAS, I'm probably going to have to figure out how to do it in nlmixed. Thanks again for the info. -Ryan
|
Next
|
Last
Pages: 1 2 3 4 Prev: Smarter Text Qualifying Than Just DSD on Import Next: Error Handling |