Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Factor variables and outreg/outreg2

From   Nick Cox <>
Subject   Re: st: Factor variables and outreg/outreg2
Date   Sat, 3 Mar 2012 09:48:03 +0000

For clarity:

1. -outreg- (John Gallup, SSC) and -outreg2- (Roy Wada, SSC) are now
quite different programs by quite different authors.

2. Both are user-written and so (once again) people referring to them
are requested to make that clear.


On Fri, Mar 2, 2012 at 9:25 PM, Richard Williams
<> wrote:
> At 03:49 PM 3/2/2012, Schmidt, William wrote:
>> I am attempting to use outreg2 but I would like to report a limited set of
>> covariates. I have factor variables in my regression, and they seem to be
>> ignored by the options in outreg. In the example below, for instance,
>>  i.foreign##c.weight is not reported.
>> sysuse auto, clear
>> regress mpg i.foreign##c.weight i.rep78 headroom
>> outreg2 using myfile, keep(i.foreign##c.weight headroom) sortvar(headroom
>> i.foreign##c.weight)
> This isn't quite right but it may be closer to what you want.
> outreg2 using myfile, keep(1.foreign#c.weight headroom) sortvar(headroom
> i.foreign#c.weight)
> Personally, I tend to avoid the ## notation and instead write stuff like
> regress mpg i.foreign weight i.foreign#c.weight i.rep78 headroom
> It may take more typing but it helps me to keep straight what I am doing.
> Plus, in various post-estimation commands, you often have to write things
> like 1.foreign rather than i.foreign. Look at how the regress command
> labeled each line of the output.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index