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: Re: st: Time demean panel variables using -center command


From   Fernando Rios Avila <[email protected]>
To   [email protected]
Subject   Re: Re: st: Time demean panel variables using -center command
Date   Wed, 12 Mar 2014 15:31:39 -0400

Dear Vaidyanathan,
have you tried to start the analysis doing the decomposition by hand
first, before relying on the mentioned "canned programs".
To recall the Oaxaca decomposition, it basically decomposes our
dependent variable in two parts:
D_betas=x0*(b1-b0)
and
D_X=b0*(x1-x0)
While I understand what you are trying to do, I dont think you can
simply enter the demeaned variables as alternative to the fixed effect
model, because all the variable means will be zero (x0 = x1=0), and
this is the reason why your model is showing somewhat inconsistent
results.
I think a better approach, other than implementing a manual
decomposition, would be to use the "adjust" option within the -oaxaca-
command, including either the list of all dummies representing the
fixed effects, or a variable that already contains the corresponding
fixed effects.
HTH.
Fernando

On Wed, Mar 12, 2014 at 3:06 PM, Nick Cox <[email protected]> wrote:
> You missed my point, but the point is a standard one. Please do read
> the Statalist FAQ and in particular its advice about explaining the
> provenance of user-written software. See
> http://www.stata.com/support/faqs/resources/statalist-faq/#stata
>
> The point is at least threefold:
>
> 1. By explaining which programs you are using you make your problem
> clearer to those who might answer it. Even those interested in the
> problem, but unlikely to offer a solution, get a sense of how to
> reproduce the problem.
>
> 2. By mentioning user-written programs as such you flag to people
> interested in similar work programs that might be useful to them.
>
> 3. The authors of such programs get at least indirectly some credit
> for their work.
>
> Nick
> [email protected]
>
>
> On 12 March 2014 18:55, Vaidyanathan Ganapathy <[email protected]> wrote:
>> Hi Nick,
>>
>> Sorry if my question was not clear. To clarify -
>>
>> My goal is to use -Oaxaca to decompose differences in ln(healthcare
>> costs) between two groups - term born infants and pre-term infants. I
>> want to specify fixed effect models for the healthcare costs,
>> separately for the term and preterm cohorts. Dependent variable is
>> ln(healthcare costs) and independent variables that change over time
>> are - income eligibility category, number of chronic conditions and
>> each chronic diagnosis (Yes/No).
>>
>> The issue is, Oaxaca doesn't support xtreg, fe. If I try using xtreg,
>> fe with Oaxaca I get an error message "suest doesn't support xtreg
>> fe". So I decided to demean the variables in my specification and just
>> use -regress, which, I believe, is equivalent to running a fixed
>> effects specification. I am able to use Oaxaca with the time demeaned
>> variables but the outputs, including the predicted values and the
>> explained and unexplained differences are not making sense.
>> Specifically, as you can see from the output, the predicted values are
>> too small and hence the explained difference is not perceptible at
>> all. Is this expected if you use demean natural log of a continuous
>> variable such as costs or wages? I wanted to know if it is meaningful
>> at all to demean ln(healthcare costs)? I tried, demeaning the
>> healthcare costs (in raw scale) first, and then take natural log and
>> it seems to work somehow. But I am not sure if this is a right
>> approach.
>>
>> Please let me know if you need further clarification/outputs etc.
>>
>> Thanks,
>>
>> Vicky
>>
>> //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
>> -------------------------------------------------------------------------------
>>
>>
>> Thanks !
>> *
>> *   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/


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