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: interaction notation for lincom (and test)

From   "Ben Hoen" <>
To   <>
Subject   st: interaction notation for lincom (and test)
Date   Wed, 28 Nov 2012 17:38:39 -0500

This is a bit of a shot in the dark...

I have interacted variables in a regression that I want to compare using
lincom (or test) and wanted to know if there was a shorthand way to recall
the variables.  The difficulty is that a number of the names of the
variables are quite long (and not something I can change), so having a
shorthand way to get at their coefficients and their se would be preferred.

For example, say I had this:  
sysuse auto, clear
g long_name_a=round(runiform())+1 
g long_name_b=round(2*runiform())+1

areg price mpg i.long_name_a#ib3.long_name_b, abs(foreign)

matrix list e(b)

* I can access the stored results of the variables like this
lincom 1b.long_name_a#1.long_name_b-2.long_name_a#1.long_name_b

*but I hoped that I could get at the same via some matrix notation from e(b)


Admittedly I am a novice in how to work with matrices but I thought I would
try the list.

Thanks, in advance,


Ben Hoen
Principal Research Associate
Lawrence Berkeley National Laboratory
Office: 845-758-1896
Cell: 718-812-7589

Visit our publications at:

*   For searches and help try:

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