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: how to force outreg2 to use only sample and stnum mean question


From   Vlad Jiman <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: how to force outreg2 to use only sample and stnum mean question
Date   Tue, 21 Jan 2014 23:11:30 +0000

statistics computed only for the sample.

 I created a dummy variable (emptyvar) that has a value of 1 for any
value not included in the sample and a value of 0 for values within
the sample.

 I then used the newly created variable with the -bys- prefix: bys
emptyvar: outreg2 using myfile, replace sideway excel stats(coef se
mean sd N) noni

 This way you get an output for the population and one for the sample.
Gimmicky but it works.


> On Fri, Dec 20, 2013 at 10:25 AM, Nick Cox <[email protected]> wrote:
>>
>> Sorry, but I answered the one detail that I thought I understood.
>>
>> Otherwise the general advice in
>> http://www.stata.com/statalist/archive/2011-10/msg01319.html still
>> applies as far as I am concerned.
>> Nick
>> [email protected]
>>
>>
>> On 20 December 2013 10:13, Vlad Jiman <[email protected]> wrote:
>> > Hi Nick,
>> >
>> > Thanks for your swift reply. I don't have a coef variable either but that seems to work.
>> >
>> > All I wanted to do was show the percentage impact of a one SD change in my outreg2 output - [coef * (mean+sd)]/(coef*mean)-1 for each variable in the regression. Any other idea how to do this?
>> >
>> > Also, what about the other outreg2 issue?
>> >
>> > Vlad
>> >
>> >
>> > Sent from my iPhone
>> >
>> >> On 19 Dec 2013, at 17:43, Nick Cox <[email protected]> wrote:
>> >>
>> >> <>
>> >>
>> >> If -sd- is not a variable in your dataset, that option will inevitably fail.
>> >>
>> >> Nick
>> >> [email protected]
>> >>
>> >>
>> >>> On 19 December 2013 17:33, Vlad Jiman <[email protected]> wrote:
>> >>> I'm doing a fixed effects panel regression on a sample of 276 out of a
>> >>> population of 300.
>> >>>
>> >>> When I use the stats(mean sd) option for outreg2, I get the mean and
>> >>> the sd for N rather than the sample only for each variable.
>> >>>
>> >>> However, if I use the sum option, I get the mean and sd only for the
>> >>> sample (but then I don't get the coef and the se). How can I have the
>> >>> coef, se, mean and sd just for the sample?
>> >>>
>> >>> On a separate note, stnum doesn't seam to recognize se, mean, or sd as
>> >>> variables in the below command... why? (coef works).
>> >>>
>> >>> . outreg2 using myfile, stats(coef, se, mean, sd, N) stnum(replace sd
>> >>> = sd*100) sideway see
>> >>> variable sd not found
>> >>> r(111);
>> >>> *
>> >>> *   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/
>> *
>> *   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