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]

From |
Theophilus Dapel <dapelzg82@gmail.com> |

To |
Statalist <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: Estimating SEM with Dummy |

Date |
Tue, 1 Apr 2014 16:33:18 +0100 |

Dear John, I have corrected the code and still got, ''factor variable not allowed’’ as error message Thanks, Dapel On 31 Mar 2014, at 06:15, John Antonakis <John.Antonakis@unil.ch> wrote: > Hi: > > Typo on my part--as Stata says, cpi cannot predict itself. So you need to see in which equation this is a problem and fix it, like below: > > sem (mmr ms lending era1-era4 cpi cps -> cps) (ms era1-era4 cps-> cpi) (era1-era4 cpi cps -> gdp_growth), cov(e.cpi*e.cps e.cpi*e.gdp_growth e.cps*e.gdp_growth) > > Best, > J. > > __________________________________________ > > John Antonakis > Professor of Organizational Behavior > Director, Ph.D. Program in Management > > Faculty of Business and Economics > University of Lausanne > Internef #618 > CH-1015 Lausanne-Dorigny > Switzerland > Tel ++41 (0)21 692-3438 > Fax ++41 (0)21 692-3305 > http://www.hec.unil.ch/people/jantonakis > > Associate Editor: > The Leadership Quarterly > Organizational Research Methods > __________________________________________ > > On 31.03.2014 00:43, Theophilus Dapel wrote: > > Dear John, > > Thank you for such an explicit and insightful reply. > > > > I got another error message after applying the recent command. The message is, cpi cannot predict itself. > > > > I also applied sem (mmr ms lending -> cps) (ms -> cpi) (era1-era4 cpi cps -> gdp_growth), cov(e.cpi*e.cps e.cpi*e.gdp_growth e.cps*e.gdp_growth) and got result after 1600 iterations with an error message: convergence not achieved > > > > On 30 Mar 2014, at 23:09, John Antonakis <John.Antonakis@unil.ch> wrote: > > > >> Hi: > >> > >> One more thing. All exogenous variables should go in all upstream equations. Thus, you should better do: > >> > >> sem (mmr ms lending era1-era4 cpi cps -> cps) (ms era1-era4 cpi cps-> cpi) (era1-era4 cpi cps -> gdp_growth), cov(e.cpi*e.cps e.cpi*e.gdp_growth e.cps*e.gdp_growth) > >> > >> See: Baltagi, B. H. (2002). Econometrics. New York: Springer. > >> > >> Best, > >> J. > >> > >> __________________________________________ > >> > >> John Antonakis > >> Professor of Organizational Behavior > >> Director, Ph.D. Program in Management > >> > >> Faculty of Business and Economics > >> University of Lausanne > >> Internef #618 > >> CH-1015 Lausanne-Dorigny > >> Switzerland > >> Tel ++41 (0)21 692-3438 > >> Fax ++41 (0)21 692-3305 > >> http://www.hec.unil.ch/people/jantonakis > >> > >> Associate Editor: > >> The Leadership Quarterly > >> Organizational Research Methods > >> __________________________________________ > >> > >> On 30.03.2014 23:35, John Antonakis wrote: > >>> Are era1-era5 your dummy variables already? Seems to me that they may > >> be. If so, you may have fallen in the "dummy variable trap." You need k-1 dummies. You have 5 categories, thus need 4 dummies. You should be estimating (note you can put more than one regressor in an equation): > >>> > >>> sem (mmr ms lending -> cps) (ms -> cpi) (era1-era4 cpi cps -> gdp_growth) > >>> > >>> Now, because cps and cpi are endogenous regressors, you cannot assume > >> that the cross-equation disturbances are orthogonal. To obtain instrumental variable estimates you should do this: > >>> > >>> sem (mmr ms lending -> cps) (ms -> cpi) (era1-era4 cpi cps -> > >> gdp_growth), cov(e.cpi*e.cps e.cpi*e.gdp_growth e.cps*e.gdp_growth) > >>> > >>> The Hausman test of endogeneity will be a 2 DF test of the latter two > >> covariances = 0, that is: > >>> > >>> test (_b[cov(e.cpi*e.gdp_growth):_cons] = 0) > >> (_b[cov(e.cps*e.gdp_growth):_cons] = 0) > >>> > >>> To better understand why you must do this see: > >>> > >>> http://www.youtube.com/watch?v=dLuTjoYmfXs > >>> > >>> For background reading see: > >>> > >>> Antonakis, J., Bendahan, S., Jacquart, P., & Lalive, R. (2010). On > >> making causal claims: A review and recommendations. The Leadership Quarterly, 21(6). 1086-1120. > >>> http://www.hec.unil.ch/jantonakis/Causal_Claims.pdf > >>> > >>> [If you wish, refer to the following “prequel” paper, which is really > >> a more basic introduction to endogeneity]: > >>> > >>> Antonakis, J., Bendahan, S., Jacquart, P., & Lalive, R. (2014). > >> Causality and endogeneity: Problems and solutions. In D.V. Day (Ed.), The Oxford Handbook of Leadership and Organizations (pp. 93-117). New York: Oxford University Press. > >>> http://www.hec.unil.ch/jantonakis/Causality_and_endogeneity_final.pdf > >>> > >>> HTH, > >>> John. > >>> > >>> > >>> > >>> __________________________________________ > >>> > >>> John Antonakis > >>> Professor of Organizational Behavior > >>> Director, Ph.D. Program in Management > >>> > >>> Faculty of Business and Economics > >>> University of Lausanne > >>> Internef #618 > >>> CH-1015 Lausanne-Dorigny > >>> Switzerland > >>> Tel ++41 (0)21 692-3438 > >>> Fax ++41 (0)21 692-3305 > >>> http://www.hec.unil.ch/people/jantonakis > >>> > >>> Associate Editor: > >>> The Leadership Quarterly > >>> Organizational Research Methods > >>> __________________________________________ > >>> > >>> On 30.03.2014 23:20, Theophilus Dapel wrote: > >>>> Dear Billy, > >>>> Thank you so much for the clarification. > >>>> > >>>> I have been building a SEM for path analysis (system of equations). > >> The dependent variables are x1, x2 and x3 (continuous variables).The depending variable is y (continuous variable). I wish to find the impact of the independent variables through intermediate variables z1 and z2 (also continuous variables). And five dummies: era1, … and era5. > >>>> > >>>> Here is the model > >>>> xi: sem (mmr -> cps, ) (ms -> cps, ) (ms -> cpi, ) (lending -> cps, > >> ) (cps -> gdp_growth, ) (cpi -> gdp_growth, ) (i.era1 -> gdp_growth, ) (i.era2 -> gdp_growth, ) (i.era3 -> gdp_growth, ) (i.era4 -> gdp_growth, ) (i.era5 -> gdp_growth, ), standardised > >>>> > >>>> On 30 Mar 2014, at 22:03, William Buchanan > >> <william@williambuchanan.net> wrote: > >>>> > >>>>> John's example was a simple linear regression. Again, you really > >> should provide more information about exactly what you are trying to do. The error message you received means that the values Stata chose by default for the starting values weren't good. You can either try specifying starting values for the model manually or it's possible that the -difficult- option for MLE algorithm could alleviate the problem. However, if you have a series of dummy variables (e.g., already coded as 0|1), then the xi: prefix isn't doing anything. If, instead, you have a series of nominal variables with several categories you could use the generate option of -tabulate- to create your dummy variables. > >>>>> > >>>>> HTH, > >>>>> Billy > >>>>> > >>>>> Sent from my iPhone > >>>>> > >>>>>> On Mar 30, 2014, at 15:42, Theophilus Dapel <dapelzg82@gmail.com> > >> wrote: > >>>>>> > >>>>>> Dear John, > >>>>>> I applied the option you gave, thanks. > >>>>>> > >>>>>> But I got an error message: initial values not feasible > >>>>>>> On 30 Mar 2014, at 17:07, John Antonakis > >> <John.Antonakis@unil.ch> wrote: > >>>>>>> > >>>>>>> Hi: > >>>>>>> > >>>>>>> In terms of controls, that is, right hand side variables. Just > >> do as you would normally: > >>>>>>> > >>>>>>> xi: sem (y <- x z i.dummy) > >>>>>>> > >>>>>>> Stata will generate k-1 dummies for you, like with other estimators. > >>>>>>> > >>>>>>> Best, > >>>>>>> J. > >>>>>>> > >>>>>>> __________________________________________ > >>>>>>> > >>>>>>> John Antonakis > >>>>>>> Professor of Organizational Behavior > >>>>>>> Director, Ph.D. Program in Management > >>>>>>> > >>>>>>> Faculty of Business and Economics > >>>>>>> University of Lausanne > >>>>>>> Internef #618 > >>>>>>> CH-1015 Lausanne-Dorigny > >>>>>>> Switzerland > >>>>>>> Tel ++41 (0)21 692-3438 > >>>>>>> Fax ++41 (0)21 692-3305 > >>>>>>> http://www.hec.unil.ch/people/jantonakis > >>>>>>> > >>>>>>> Associate Editor: > >>>>>>> The Leadership Quarterly > >>>>>>> Organizational Research Methods > >>>>>>> __________________________________________ > >>>>>>> > >>>>>>>> On 30.03.2014 16:38, Theophilus Dapel wrote: > >>>>>>>> Dear User of Stata, > >>>>>>>> Any assistance on how to estimate a SEM with dummies in the > >> list of control variables? > >>>>>>>> > >>>>>>>> Thanks, > >>>>>>>> Dapel > >>>>>>>> * > >>>>>>>> * For searches and help try: > >>>>>>>> * http://www.stata.com/help.cgi?search > >>>>>>>> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Estimating SEM with Dummy***From:*John Antonakis <John.Antonakis@unil.ch>

- Prev by Date:
**Re: st: Estimating SEM with Dummy** - Next by Date:
**Re: st: suregub** - Previous by thread:
**[no subject]** - Next by thread:
**Re: st: Estimating SEM with Dummy** - Index(es):