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: xtivreg2 with factor variables


From   "Anat (Manes) Tchetchik" <[email protected]>
To   [email protected]
Subject   Re: st: xtivreg2 with factor variables
Date   Tue, 31 Dec 2013 13:31:20 +0200

David,
thanks for your advice, as for your question:
I used  -xtivreg2- model for its ability to accommodate two-way
cluster-robust covariance matrix estimates  (i.e. country and year). I
have no instruments in the model, I used lagged independent variables.
 As I understand that using iv is an option in the  -xtivreg2- not
mandatory (also, if if matters, my data is not consistent with re
estimation only fe).
I'm not sure I understand what do you mean by "treat year as
continuous" . as I understand it years can be either represented in
one categorical variable, or several binay vars.  (dummies)
Best regards,
Anat



On Tue, Dec 31, 2013 at 12:34 AM, David Torres <[email protected]> wrote:
>
> Anat,
>
> Try the xi: operator before the command.
>
> xi: xtivreg2 log_ss dem gini gdp i.year, fe cluster(country_code year) bw(1)
>
> That will automatically break year out into dummy variables.
>
> I'm surprised, though, that you're using -xtivreg2- in the absence of any instruments.  I would argue that if you want to treat year as continuous, you should rethink the model.  You might also prefer using -xtivreg- over -xtivreg2-.  For instance, say you need to instrument for one of the variables in your model, say gdp.  Let's give the instrument a generic name, say rainfall.  You would do something like this:
>
> xtivreg log_ss dem gini c.year (gdp = rainfall), re vce(cluster country_code)
>
> and interactions are also possible:
>
> xtivreg log_ss dem gini gini#c.year (gdp = rainfall), re vce(cluster country_code)
>
> The last model here assumes gini is a time-invariant predictor for which you want to know its relationship to time.
>
> Cheers,
>
> --
>
> David Diego Torres, PhD
> NSF SBE Postdoctoral Research Fellow
> Houston Education Research Consortium
> Rice University
> 6100 Main Street, MS-28
> Houston, TX 77005
> Phone: 713-348-2984
> Email: ddtorres at rice dot edu
>
>
> ----------------------------------------
> > Date: Tue, 31 Dec 2013 00:15:11 +0200
> > Subject: st: xtivreg2 with factor variables
> > From: [email protected]
> > To: [email protected]
> >
> > Dear all,
> > I have an unbalanced panel of macroeconomic data on 35 countries over 17 years.
> > My analysis shows that time effects are jointly significant, as well
> > as indicated first order autocorrelation.
> > I
> > therefore ran the following command:
> > . xtivreg2 log_ss dem gini gdp i.year, fe cluster(country_code year) bw(1)
> >
> > I got the following error: factor variables not allowed
> > Shell I specify each year dummy (excl. one) or is there a different
> > problem here?
> > Any advise will be appreciated!
> > Anat
> >
> >
> > --
> > Anat Tchetchik, PhD
> > Department of Business Administration
> > Guilford Glazer Faculty of Business and Management
> > Ben-Gurion University of the Negev
> > P.O.Box: 653
> > Beer-Sheva, Israel, 84105
> >
> > E-mail: [email protected]
> > Phone 972-(0)8-6479735
> > Fax: 972-(0)8-6472920
> > *
> > * 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/




-- 
Anat Tchetchik, PhD
Department of Business Administration
Guilford Glazer Faculty of Business and Management
Ben-Gurion University of the Negev
P.O.Box: 653
Beer-Sheva, Israel, 84105

E-mail:       [email protected]
Phone         972-(0)8-6479735
Fax:           972-(0)8-6472920

*
*   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/


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