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]

st: outreg2.versionSet error

From   Michael LeGower <>
Subject   st: outreg2.versionSet error
Date   Mon, 18 Mar 2013 19:00:53 -0400

There appears to be a flaw in the versionSet program within the outreg2
package as installed by a -ssc install outreg2- command.  In the copy I
have, any Stata version greater than 8.2 it treats as version 8.2, which
it then passes back to the estimation command (if using the -outreg2
<contents> : <estimation command>- syntax).  This seems to conflict with
estimation commands that use factor variable notation.

Here is an example using the 1978 Automobile reference dataset under Stata

which outreg2
*! outreg2 2.2.4 12apr2010
*! based on outreg 3.0.6/4.0.0

sysuse auto

* Syntax 1: Regression with factor variables; Fine in Stata 12, even when
followed with an -outreg2- command separately

regress price i.foreign
outreg2 using test1

* Syntax 2: -outreg2- prefix before same command; error results

outreg2 using test2: regress price i.foreign

* Syntax 3: -outreg2- prefix before same command with -xi- prefix; Fine

outreg2 using test2: xi: regress price i.foreign

* Syntax 3b: outreg2 prefix before command with -xi- prefix AND factor
variable interaction; error

outreg2 using test2: xi: regress price i.foreign#i.rep78

With the stock -outreg2- command as installed from SSC, the second syntax
fails and the first and third run fine.  Adding an interaction term makes
even the third syntax fail, however.  If the SSC -outreg2- package could
be updated so that commands 2 and 3b did not produce an error, that would
be tremendous.  Otherwise, this is to let people know that an -xi- will be
required if using the -outreg2- prefix before an estimation command with
factor variable notation, and models with factor variable interactions
will require you to run the -outreg2- command post estimation.


Michael LeGower

*   For searches and help try:

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