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: Adjusted R2 for Driscoll Kraay SE
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Adjusted R2 for Driscoll Kraay SE
Date
Thu, 28 Mar 2013 14:12:00 +0000
Thanks for the details.
"varlist" does not qualify as "exactly what you typed", but this does
illuminate what you are doing and knowing what the varlist wouldn't
change the problem.
To expand on what I said earlier, -estout- can show r2_a if a previous
command produced e(r2_a), which you can check by typing
. eret li
after each command.
Of the commands that you used only -xtreg, fe- produces e(r2_a), which
is why you can see results only for that command.
You appear to have an extra problem with -estadd-, which I have never
used, but I cannot see -- from a quick look at what those -xt-
programs do -- that you could possibly succeed in adding any results
for
e(r2_mfadj)
e(r2_adj)
because none of the commands concerned produces such results. (Note
that William did not recommend this code that you are trying: what are
you basing it on?)
The nub of the matter is this.
1.Modelling commands leave e-class results in their wake. You can look
at documentation or you can look at the results of -eret li- to see
what is available after a command has run.
2. A command like -estout- can't print what isn't available.
Nick
On Thu, Mar 28, 2013 at 1:42 PM, Benjamin Schmid <[email protected]> wrote:
> Thanks for the replies.
> Sorry for the inaccurate description. Furthermore, there was no complaint
> directed at the -estout- command at all, but rather a question on how to
> retrieve values if they are not displayed. Hope the following information is
> accurate.
>
> I am using Stata/IC 12.0 for Windows (64-bit x86-64)
> Revision 24 Aug 2011
>
> I run following commands.
> 1. -xtreg varlist, fe r- *! version 1.7.6 21jun2011
> 2. -estimates store applicationone-
> 3. -xtscc varlist, fe- *! xtscc, version 1.3, Daniel Hoechle, 10oct2011
> 4. -estimates store applicationtwo-
> 5. -xtreg varlist, re r- *! version 1.7.6 21jun2011
> 6. -estimates store applicationthree-
>
> Then I run the -estout- command: I am using is *! version 3.13 06aug2009
> Ben Jann.
> The exact code I use is: -estout applicationone applicationtwo
> applicationthree, cells(b(fmt(a3) star) t(par fmt(3))) stats(r2 r2_a N,
> fmt(%9.3f %9.3f %9.0g) labels(R-squared R-squared_adjusted #_Observations))
> starlevels(* 0.10 ** 0.05 *** 0.01) legend label postfoot(`"{hline @width}"'
> `"t statistics in parentheses"')-
>
> Stata then returns the R^2 and R^2_adj for the fixed effects -xtreg, fe r-
> but does not display the R^2 and R^2_adj for the random effects -xtreg, re
> r- or the -xtscc, fe-.
>
> If I try to add the estimates as proposed by William using the -estadd
> fitstat, e( r2_mfadj)- or -estadd fitstat, e(r2_adj)- Stata returns:
> -fitstat- does not work with the last model estimated. -estadd- *! version
> 2.3.1 07oct2009 Ben Jann
>
> Thank you very much again
> Ben
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Nick Cox
> Gesendet: Donnerstag, 28. März 2013 13:50
> An: [email protected]
> Betreff: Re: st: Adjusted R2 for Driscoll Kraay SE
>
> In similar spirit:
>
> There can be no reasonable complaint here about -estout- (SJ/SSC).
> -estout- can't display what it can't find.
>
> Benjamin appears to be thinking that -xtscc- (SJ/SSC) leaves an adjusted R^2
> in its wake as e(r2_a). That isn't correct. Perhaps there is scope to do
> some extra calculation: I can't advise on that.
>
> Benjamin should read again the Statalist FAQ, particularly with regard to
> explaining (1) where user-written commands you refer to come from
> (2) the exact code you typed and what Stata did. It is unclear here
> precisely which command(s) preceded -estout-.
>
> Nick
>
> On Thu, Mar 28, 2013 at 12:32 PM, William Buchanan
> <[email protected]> wrote:
>
>> Your issue is really with the user-written command -estout- (from SSC) and
> not so much with the subject heading. Look at the help file for the command
> and see where the R2 and adjusted R2 are stored. You may need to first use
> -estadd- (which is part of the -estout- suite of programs) to add those
> scalars to a place where the -estout- command can access them.
>
> On Mar 28, 2013, at 4:43, Benjamin Schmid <[email protected]> wrote:
>
>>> I am new to Stata and am currently analysing a panel applying the
>>> Driscoll Kraay SE as introduced into Stata by Daniel Hoechle. As I
>>> have not found a solution to my question in older posts I am not sure
>>> if the question may even be too trivial.
>>>
>>> If I run my regressions and then use the following command to create
>>> an output table I am not given the adjusted R2 value.
>>> estout, cells(b(fmt(a3) star) t(par fmt(3))) stats(r2 r2_a N,
>>> fmt(%9.3f %9.3f %9.0g) labels(R-squared R-squared_adjusted
>>> #_Observations))
>>> starlevels(* 0.10 ** 0.05 *** 0.01) legend label postfoot(`"{hline
> @width}"'
>>> `"t statistics in parentheses"')
>>>
>>> I can look up the R2 in the actual regression in Stata but not the
>>> Adjusted R2. Given the fact, that the R2 of the xtreg varlist, fe r
>>> command and using the xtscc varlist, fe command are the same (if I
>>> have the same variables), does this implicate that the Adj. R2 are also
> identical?
>>>
*
* 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/