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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Using # sign with factor variables to create interactions


From   "Bontempo, Daniel E" <deb193@ku.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Using # sign with factor variables to create interactions
Date   Fri, 6 Aug 2010 12:23:34 -0500

Does "margins smoker#agegrp" give you what you want?



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Weichle,
Thomas
Sent: Friday, August 06, 2010 11:12 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: Using # sign with factor variables to create interactions

Hi Statalisters,
I'm using the new # sign notation with factor variables to create
interactions.  I would like to do post model linear combinations with
the lincom command.  Since the level indicator variables are not created
in the dataset (or memory I believe), how do I do linear combinations
after running a model that incorporated an interaction using the # sign
notation (ex. smoker#agegrp)?  I've discovered that I could just change
the base level in order to see different linear combinations but this
requires running new models for each combination I want.  Is this the
best way to do it with the new notation?

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
Thomas.Weichle@va.gov 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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