Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: SEM with categorical variables


From   William Buchanan <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: SEM with categorical variables
Date   Fri, 31 Aug 2012 03:47:19 -0700

Duru,

There is no "black box" per se in the methods used by Mplus and it most certainly depends on options selected by the user.  Maybe if you provide the equivalent Mplus syntax that you used, folks who use Stata and Mplus could provide you with clearer guidance.  You're probably also aware that Mplus calculates a wider array of fit indices than Stata does currently, but that should be expected given the highly specialized nature of Mplus.  That being said, what Stas told you earlier is still very relevant and should be considered more thoroughly.

HTH,
Billy

Sent from my iPhone

On Aug 31, 2012, at 3:23, Duru <[email protected]> wrote:

> Thanks for the comments, and this code works well. But, when I feed
> that correlation matrix into SEM in Stata it does not take into
> account that the data is ordinal while calculating fit indices. I
> don't know if this is really a problem, but Mplus' black box procedure
> uses weighted least squares and probit regressions while estimating
> the model and they mention that they make adjustments to obtain a
> correct p-value etc.
> 
> Another thing is that my model will also include continuous predictors
> then I need to calculate those correlations separately and combine it
> with the polychoric correlation matrix which seems to require some
> craftiness -as yours- with macros.
> 
> Best,
> 
> Duru
> 
> 
> On Tue, Aug 28, 2012 at 7:37 PM, Stas Kolenikov <[email protected]> wrote:
>> 
>> So do you know exactly what Mplus does? Having the software decide for
>> you what to do is good for exploratory phases, but for real research,
>> you have to know what you are doing, and make sure the suggested
>> default is appropriate for your analysis.
>> 
>> Incidentally, I've been doing some polychoric-to-sem work earlier
>> yesterday. Here's the outline:
>> 
>> local thevars <varlist of the variables of interest>
>> polychoric `thevars'
>> mat polychR = r(R)
>> forvalues i=1/`: word count `thevars' ' {
>>  forvalues j=1/`i' {
>>    local setcor `setcor' `=polychR[`i',`j']'
>>  }
>>  if `i' < `: word count `thevars' ' local setcor `setcor' \
>> }
>> local N = _N
>> clear
>> ssd init `thevars'
>> ssd set obs `N'
>> ssd set cor `setcor'
>> sem ( your model structure comes here)
>> 
>> Not terribly elegant, but that's way better than nothing. (Don't
>> assume this will work as a black box; you would be much better off
>> understanding what each line does.)
>> 
>> On Tue, Aug 28, 2012 at 3:41 AM, Duru <[email protected]> wrote:
>>> Dear all,
>>> I am trying to estimate a structural equations model with Stata 12. I
>>> have ordinal items for my latent dependent variable and categorical
>>> manifest independent variables.
>>> I am not clear on how to handle this. I have read somewhere on the web
>>> that estimating polychoric correlations and feeding them into SEM
>>> could be an option or specifying another estimation method (than ML)
>>> would suffice? In Mplus I just need to specify those variables as
>>> categorical and it chooses the proper method by default.
>>> 
>>> Many thanks,
>>> 
>>> Duru
>>> *
>>> *   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/
>> 
>> 
>> 
>> --
>> -- Stas Kolenikov  ::  http://stas.kolenikov.name
>> -- Senior Survey Statistician, Abt SRBI  ::  work email kolenikovs at
>> srbi dot com
>> -- Opinions stated in this email are mine only, and do not reflect the
>> position of my employer
>> *
>> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index