Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Indicator variables and interactions in est2tex and outreg2

From   rzultan <>
Subject   st: Indicator variables and interactions in est2tex and outreg2
Date   Tue, 24 Jul 2012 06:00:26 -0700 (PDT)


I'm trying to construct regression tables for Latex without success. The
estimation command is:

xtreg par c.optimal##c.optimal##c.optimal##Ab, i(U)

where Ab has two levels, 1 and 2 and Be has two levels, 0 and 1. If Be=0,
then bet=99, and if Be=1, then bet takes values of (1 2 3). I include the
redundant variable Be in the estimation to use as a dimension in

Using est2tex, I run:

est2vec gap, e(N_g sigma_u sigma_e) vars(_cons 2.Ab Ab#bet
optimal optimal#optimal optimal#optimal#optimal) name(1) replace

which results in the correct matrices. Running:

est2tex gap, preserve replace

creates a nice matrix gap_tbl (which can also be created by est2one).
However, I then get an error message:

error (as svmat was applied)
invalid syntax

Which I assume is because of the variable names in e(), which include the
interaction symbol # and indicator prefixes such as 2.Ab and

I tried to do the same with outreg2, e.g.,

outreg2 2.Ab Ab#bet optimal c.optimal#c.optimal
c.optimal#c.optimal#c.optimal using gap, replace tex see

But the resulting table drops all of the indicator variables. I tried with
different formats such as i.Ab, but nothing works.

I would be grateful for any solution, either using est2tex or outreg2.


Ro'i Zultan

View this message in context:
Sent from the Statalist mailing list archive at
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index