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]

From |
Ricardo Basurto <ricardobasurto@gmail.com> |

To |
statalist <statalist@hsphsun2.harvard.edu> |

Subject |
Re-re-post: Stata 11 - Factor variables in a regression command |

Date |
Sat, 1 May 2010 01:48:42 -0400 |

Not the best way to start posting to StataList, is it? I am re-arranging my message hoping that at least that way my question won't be cut out. (If anyone has suggestions on how to successfully submit messages from within Gmail, I would appreciate those as well.) -------------------------------------------------------------------------------------------------------------------------------------------------------- I am having trouble understanding the difference between a regression that uses a cross operator (#) and one that uses a cross factorial operator (##). For example, below is the output I get from running two different regressions. From the log-likelihood ratio, chi2, etc, it seems clear to me that both commands are fitting the same regression model. Also, I can reproduce the second regression by fitting a regression with dummies for a=1, b=1, and a variable equal to the multiplication of those two dummies; however, I just can't figure out what exact model is being fitted in the first regression. Can anyone explain this? Thank you, Ricardo REGRESSION #1: . logistic y a#b Logistic regression Number of obs = 19670 LR chi2(3) = 7.71 Prob > chi2 = 0.0525 Log likelihood = -1473.1898 Pseudo R2 = 0.0026 ---------------------------------------------------------------------------- y | Odds Ratio Std. Err. z P>|z| [95% Conf. Int.] -----------+---------------------------------------------------------------- a#b | 0 1 | 1.567419 .2804138 2.51 0.012 1.1038 2.2256 1 0 | 1.447424 .2588797 2.07 0.039 1.0194 2.0551 1 1 | 1.211988 .2246236 1.04 0.300 .84283 1.7428 ---------------------------------------------------------------------------- REGRESSION #2 . logistic y a##b Logistic regression Number of obs = 19670 LR chi2(3) = 7.71 Prob > chi2 = 0.0525 Log likelihood = -1473.1898 Pseudo R2 = 0.0026 ---------------------------------------------------------------------------- y | Odds Ratio Std. Err. z P>|z| [95% Conf. Int.] -----------+---------------------------------------------------------------- 1.a | 1.447424 .2588797 2.07 0.039 1.0194 2.0551 1.b | 1.567419 .2804138 2.51 0.012 1.1038 2.2256 | a#b | 1 1 | .5342167 .1302597 -2.57 0.010 .33125 .86152 ---------------------------------------------------------------------------- * * 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/

**Follow-Ups**:**Re: Re-re-post: Stata 11 - Factor variables in a regression command***From:*Michael Norman Mitchell <Michael.Norman.Mitchell@gmail.com>

- Prev by Date:
**[no subject]** - Next by Date:
**Re: Re-re-post: Stata 11 - Factor variables in a regression command** - Previous by thread:
**Re-Post: Stata 11 - Factor variables in a regression command** - Next by thread:
**Re: Re-re-post: Stata 11 - Factor variables in a regression command** - Index(es):