Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
William Buchanan <william@williambuchanan.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Latent Growth Curve SEM GUI |

Date |
Fri, 15 Jun 2012 21:01:26 -0700 |

Hi Carter, Not sure if this is what you were thinking of, but maybe this might help you with the syntax to replicate the other results: use http://www.stata-press.com/data/r12/sem_lcm, clear set seed 10101 gen x1=rbinomial(1,.5) gen x2=rbinomial(1,.35) gen x3=rbinomial(1,.75) sem (lncrime0 <- I@1 S@0 _cons@0)(lncrime1 <- I@1 S@1 _cons@0)(lncrime2 <- I@1 S@2 _cons@0)(lncrime3 <- I@1 S@3 _cons@0)(I S <-x1 x2 x3), latent(I S) var(e.lncrime0@var e.lncrime1@var e.lncrime2@var e.lncrime3@var) meth(ml) vce(r) Based on the syntax from the Mplus example, the latent variables were regressed on the covariates (I S <-x1 x2 x3). I created three categorical variables to be something more comparable to the Mplus example that you referenced. There are probably several other ways that you could accomplish the same task, but this was the easiest way that I could think of. I also downloaded the reference dataset that Mplus used, but can't figure out which variables they used when they created their extract. If you know where the .inp and .dat files are for the reference dataset (they didn't seem to be on the Mplus website), I could try to replicate what they did with the same data. Hope this helps, Billy On Jun 15, 2012, at 3:59 PM, Carter Rees wrote: > Hi Billy, > > Slide 86 is what I am trying to do (not the same data but the model spec is the same). But, I only want to use the observed variable female. Syntax is on slide 87. > > http://www.statmodel.com/download/Topic3-v.pdf > > Carter > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Carter Rees, Ph.D. > Assistant Professor > Arizona State University > School of Criminology and Criminal Justice > 602-496-0495 > carter.rees@asu.edu (mailto:carter.rees@asu.edu) > > > > On Friday, June 15, 2012 at 5:54 PM , William Buchanan wrote: > >> Hi Carter, >> >> Can you copy the Mplus example into the e-mail? I know several people will still have copies of Mplus, EQS, LISREL, and/or AMOS laying around and seeing what exactly you are trying to replicate would be helpful. If you're using one of the example datasets from Stata or a publicly available data set that would be helpful to know as well. >> >> - Billy >> >> >> On Jun 15, 2012, at 3:46 PM, Carter Rees wrote: >> >>> Hi Billy, >>> >>> The Mplus example comes from a stats workshop I attended. The model specification is the same as found in the Stata SEM manual (just a different variable measured at the 4 time points). >>> >>> The Stata manual example of a latent growth curve also specifies the model without any covariates. So, I don't see any syntax that shows me how to do this. >>> >>> Carter >>> >>> On Friday, June 15, 2012 at 5:41 PM , William Buchanan wrote: >>> >>>> Hi Carter, >>>> >>>> Which Mplus example are you trying to replicate? It might just be that what you are trying to do would be better expressed via syntax than in the GUI. Have you looked through the [SEM] manual for Stata? There is a Growth Curve model in the examples section there which could probably give you a good idea of ways to modify the syntax to reproduce things correctly. >>>> >>>> >>>> Billy >>>> >>>> >>>> >>>> On Jun 15, 2012, at 3:19 PM, Carter Rees wrote: >>>> >>>>> Using Stata 12 on a Mac. >>>>> >>>>> I have the basic latent growth curve model with 4 time points set up using the SEM GUI. I would like to add one time invariant covariate (gender) to predict the growth factors (intercept and slope) using the GUI. However, each time I try to add this variable either as latent or observed I get the error message "Cannot add path. Target variable will become endogenous and is correlated with exogenous variables". How do I add this via the GUI? >>>>> >>>>> My goal is to replicate the results of an example from MPlus so I can get a better feel for what the Stata code will look like and how the GUI works. No troubles fitting the LGC without the covariate but the covariate is stumping me. >>>>> >>>>> Thanks. >>>>> >>>>> Carter >>>>> >>>>> /*LGC without covariate*/ >>>>> sem (posT1 <- intercept@1 slope@0 _cons@0) /// >>>>> (posT2 <- intercept@1 slope@1 _cons@0) /// >>>>> (posT3 <- intercept@1 slope@2 _cons@0) /// >>>>> (posT4 <- intercept@1 slope@3 _cons@0), /// >>>>> latent(intercept slope) /// >>>>> var(e.posT1@var e.posT2@var e.posT3@var e.posT4@var) /// >>>>> means(intercept slope) >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> * >>>>> * For searches and help try: >>>>> * http://www.stata.com/help.cgi?search >>>>> * http://www.stata.com/support/statalist/faq >>>>> * http://www.ats.ucla.edu/stat/stata/ >>>> >>>> >>>> >>>> >>>> >>>> >>>> * >>>> * For searches and help try: >>>> * http://www.stata.com/help.cgi?search >>>> * http://www.stata.com/support/statalist/faq >>>> * http://www.ats.ucla.edu/stat/stata/ >>> >>> >>> >>> >>> >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/statalist/faq >>> * http://www.ats.ucla.edu/stat/stata/ >> >> >> >> >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/statalist/faq >> * http://www.ats.ucla.edu/stat/stata/ > > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: Latent Growth Curve SEM GUI***From:*Carter Rees <carterrees@gmail.com>

**Re: st: Latent Growth Curve SEM GUI***From:*William Buchanan <william@williambuchanan.net>

**Re: st: Latent Growth Curve SEM GUI***From:*Carter Rees <carterrees@gmail.com>

**Re: st: Latent Growth Curve SEM GUI***From:*William Buchanan <william@williambuchanan.net>

**Re: st: Latent Growth Curve SEM GUI***From:*Carter Rees <carterrees@gmail.com>

- Prev by Date:
**Re: st: making srting variable similar across files** - Next by Date:
**Re: st: Latent Growth Curve SEM GUI** - Previous by thread:
**Re: st: Latent Growth Curve SEM GUI** - Next by thread:
**Re: st: Latent Growth Curve SEM GUI** - Index(es):