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]

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

From   Christopher Swearingen <>
Subject   Re: st: Using # sign with factor variables to create interactions
Date   Fri, 6 Aug 2010 17:02:56 -0400

The factor variable interactions are available for post-estimation using LINCOM.

e.g. ---

logistic outcome i.smoker##i.agegrp

lincom 1.smoker + 2.agegrp + 1.smoker#2.agegrp

You should be able to estimate all levels in this manner.

Best regards,


Christopher Swearingen, Ph.D.
Assistant Professor of Pediatrics and Biostatistics
University of Arkansas for Medical Sciences
Department of Pedatrics
One Children's Way, Slot 512-43
Little Rock, AR 72202

> 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

*   For searches and help try:

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