Statalist


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

Re: st: RE: Adj-R2 becomes too low with XTIVREG2?


From   Erasmo Giambona <e.giambona@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Adj-R2 becomes too low with XTIVREG2?
Date   Fri, 27 Mar 2009 16:27:11 +0100

Thanks very much Mark,

Erasmo

On Fri, Mar 27, 2009 at 2:51 PM, Schaffer, Mark E <M.E.Schaffer@hw.ac.uk> wrote:
> Erasmo,
>
> You've got a good question here.
>
> The rationale for -xtivreg2-'s behaviour is straightforward. The formula for adjusted R2 is:
>
> Adjusted R2 = 1- (1 - R2 )((n - 1)/(n - k - 1))
>
> The VCV doesn't figure in this, so I don't see why the dof adjustment for adjusted R2 should change simply because the user asked for a cluster-robust VCV.  Thus -xtivreg2- reports the same R2 and adjusted R2 whether or not -cluster- is specified.
>
> Why official -xtreg, fe- should change the dof adjustment when someone changes the way the VCV is calculated - but not the way R2 is calculated! - is a mystery to me.
>
> Cheers,
> Mark
>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of
>> Erasmo Giambona
>> Sent: Friday, March 27, 2009 1:15 PM
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: RE: Adj-R2 becomes too low with XTIVREG2?
>>
>> Dear Statlist,
>>
>> Sorry to be here again, but I think this might be interesting
>> to everybody.
>>
>> I think I have actually found the source of the apparent discrepancy.
>> It turns out that xtreg does not include the number of groups in the
>> denominator of the formula to calculate the adj-r2 if one clusters at
>> the group level. xtivreg2 always includes the number of groups in the
>> denominator of the formula whether or not one clusters at the group
>> level.
>>
>> I really hope Mark Schaffer could comment on this.
>>
>> Regards,
>>
>> Erasmo
>>
>>
>>
>> On Fri, Mar 27, 2009 at 10:39 AM, Erasmo Giambona
>> <e.giambona@gmail.com> wrote:
>> > Dear Statalist,
>> >
>> > I posted a message a few days ago about the Adj-R2 with xtivreg2.
>> > Following a suggestion of Nick Cox, I posted a code (and data) that
>> > exactly replicates my commands.
>> >
>> > I will try to reformulate my question with the hope that
>> somebody can
>> > provide some suggestions on how to interpret my output.
>> Here it is: I
>> > fit exactly the same model with xtreg and xtivreg2. R2 and
>> Adj-R2 are
>> > about 0.20 with xtreg. R2 and Adj-R2 are respectively about 0.20 and
>> > 0.02 with xtreg and xtivreg2. I am puzzled by the drop in the Adj-R2
>> > in this latter case. My question is: could this drop by explained by
>> > the poor properties of the Adj-R2 with IV regressions?
>> >
>> > I would also be happy to pass my data and code to anybody who can
>> > provide further insights.
>> >
>> > Thanks and regards,
>> >
>> > Erasmo
>> >
>> >
>> >
>> >
>> > On Wed, Mar 25, 2009 at 6:19 PM, Erasmo Giambona
>> <e.giambona@gmail.com> wrote:
>> >> Here is the exact code I am using based on data (also
>> attached) from
>> >> help q_cross.
>> >>
>> >> Thanks,
>> >>
>> >> Erasmo
>> >>
>> >> On Wed, Mar 25, 2009 at 5:46 PM, Nick Cox
>> <n.j.cox@durham.ac.uk> wrote:
>> >>> I am just asking for more information on behalf of those who might
>> >>> answer this question.
>> >>>
>> >>> I understand that your dataset is too big to post here,
>> but that's all
>> >>> the more reason to strain to reproduce the behaviour you report in
>> >>> something mutually accessible, say one of the datasets
>> downloadable via
>> >>>
>> >>> . help q_cross
>> >>>
>> >>> I can't see anywhere in your reply the precise commands
>> you used. That
>> >>> means a do file, or equivalent. It means exact code. It
>> means something
>> >>> reproducible. You don't need more "hints": just do what I say!
>> >>>
>> >>> Nick
>> >>> n.j.cox@durham.ac.uk
>> >>>
>> >>> Erasmo Giambona
>> >>>
>> >>> Thanks Nick.
>> >>>
>> >>> It is a very large dataset, but I would still be happy to
>> pass it to
>> >>> Mark Scaffer.
>> >>>
>> >>> In any case, I will also try to provide more details about the
>> >>> commands and the data.
>> >>>
>> >>> I am using an unbalanced panel dataset of firms over a
>> period of about
>> >>> 10 years. For both xtreg and xtivreg2 I am fitting
>> exactly the same
>> >>> model. In both cases, I cluster the standard errors at
>> the firm level
>> >>> and I use fe i(firm). In the iv-model, three of the independent
>> >>> variables are assumed endogenous.
>> >>>
>> >>> I hope I have not missed anything else.
>> >>>
>> >>> Any hints would be appreciated,
>> >>>
>> >>> Erasmo
>> >>>
>> >>>
>> >>> On Wed, Mar 25, 2009 at 5:06 PM, Nick Cox
>> <n.j.cox@durham.ac.uk> wrote:
>> >>>> -xtivreg2- is a user-written command from SSC (Mark Schaffer).
>> >>>>
>> >>>> For Mark, or anybody else, to have anything much to work
>> with here,
>> >>> tell
>> >>>> us about the data and the precise commands you used.
>> >>>>
>> >>>> Ideally, reproduce your results on a dataset accessible
>> to all, or let
>> >>>> Mark privately have a copy of your data _and_ your commands.
>> >>>>
>> >>>> Otherwise there is little to go on here. It's not even
>> clear that you
>> >>>> are fitting precisely the same model, or equivalent models.
>> >>>>
>> >>>> More attention to age-old advice in the FAQ, often
>> repeated on the
>> >>> list,
>> >>>> would have yielded a question easier to answer.
>> >>>>
>> >>>> Nick
>> >>>> n.j.cox@durham.ac.uk
>> >>>>
>> >>>> P.S. no SHOUTING of command names please.
>> >>>>
>> >>>> Erasmo Giambona
>> >>>>
>> >>>> I am estimating the panel regression model with XTREG
>> and XTIVREG2.
>> >>>> When I use XTREG, I obtain an adj-R2 of around 0.21. The
>> within and
>> >>>> between R2's have a similar size. Similarly, when I use
>> XTIVREG2, the
>> >>>> centered and uncentered R2 are around 0.20. However, if
>> I do: . di
>> >>>> "R2-adj: " e(r2_a), I get: R2-adj: .02060245. This sems
>> a huge drop
>> >>>> compared to the centered/uncentered R2 or the adj-R2 from XTREG.
>> >>>>
>> >>>> I have explored the statalist archive finding a lot of
>> very useful
>> >>>> information about the nuances with the R2 with IV
>> regressions, but I
>> >>>> didn't find a good answer to my question.
>> >>>>
>> >>>> I would appreciate any hints on this issue.
>> >>>
>> >>> *
>> >>> *   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/
>>
>
>
> --
> Heriot-Watt University is a Scottish charity
> registered under charity number SC000278.
>
>
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index