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: Time demean panel variables using -center command
From
Austin Nichols <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Time demean panel variables using -center command
Date
Wed, 12 Mar 2014 07:45:35 -0400
Vaidyanathan Ganapathy <[email protected]>:
This appears to be quite incorrect. If you demean each variable by
case, you are computing -xtreg,fe- or -areg- estimates, and an
indicator for preterm birth (which presumably does not vary by case)
should drop out of the regression.
On Wed, Mar 12, 2014 at 3:07 AM, Vaidyanathan Ganapathy
<[email protected]> wrote:
> Dear STATAlisters,
>
> I have a panel data (id, time) and wondering what would be the best
> method to demean the dependent variable, which is natural logarithm of
> costs? I tried using the -center command by Ben Jann which produces
> the demeaned variables case wise. Can we demean ln(dependent variable)
> as it is, or should the dependent variable be first time demeaned
> using original scale and then logarithm be applied?
>
> I basically used the -center command to demean ln(costs) to use the
> demeaned variables for regressions run on 2 separate groups (the goal
> is to run separate fixed effects models for 2 groups and compare the
> coefficients). However, when I compare coefficients of the variables
> from the two regressions (i.e. take the difference), the results are
> not meaningful. By not meaningful, I mean that the overall differences
> in coefficients are too small or getting dropped out.
>
> Is there something wrong with the approach of demeaning the dependent
> variable - ln(costs), or is there something wrong in how the
> differentials were calculated (I am using the Oaxaca decomposition
> method to analyze differences between the coefficients)?
>
> Below is what I ran and the corresponding outputs -
>
> //De-mean the ln(dependent) and the indendent variables -
>
> by pcn: center lnallhccx2 tpcat2-tpcat6 bpdx2 chdx2 asthbrdx2 cnsdx2
> motordx2 physdevdx2 nddx2 chrnic1, casewise
>
> //Run OLS regression with cluster robust errors of the dependent
> variable on set of predictors for two groups (premie_cat=0 and
> premie_cat==2)
>
> oaxaca c_lnallhccx2 c_tpcat2- c_tpcat6 c_bpdx2 c_chdx2 c_asthbrdx2
> c_cnsdx2 c_motordx2 c_physdevdx2 c_nddx2 c_chrnic1 c_period if
> premie_cat==0|premie_cat==2, by(premie_cat) weight(0 1) cluster(pcn)
>
>
> Blinder-Oaxaca decomposition Number of obs = 137972
>
> 1: premie_cat = 0
> 2: premie_cat = 2
>
> (Std. Err. adjusted for 68994 clusters in pcn)
> -------------------------------------------------------------------------------
> | Robust
> c_lnallhccx2 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
> --------------+----------------------------------------------------------------
> Differential |
> Prediction_1 | 4.73e-10 6.22e-10 0.76 0.447 -7.46e-10 1.69e-09
> Prediction_2 | 1.19e-08 9.81e-09 1.21 0.227 -7.36e-09 3.11e-08
> Difference | -1.14e-08 9.83e-09 -1.16 0.247 -3.07e-08 7.88e-09
> --------------+----------------------------------------------------------------
> Decomposition |
> Explained | 0 (omitted)
> Unexplained | -1.14e-08 9.83e-09 -1.16 0.247 -3.07e-08 7.88e-09
> -------------------------------------------------------------------------------
>
>
*
* 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/