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]

st: interaction notation for lincom (and test)


From   "Ben Hoen" <[email protected]>
To   <[email protected]>
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

Ben Hoen
Principal Research Associate
Lawrence Berkeley National Laboratory
Office: 845-758-1896
Cell: 718-812-7589
[email protected]
http://emp.lbl.gov/staff/ben-hoen

Visit our publications at: 
http://emp.lbl.gov/publications




*
*   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