Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Ricardo Basurto-Dávila <ricardobasurto@gmail.com> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Stata 11 - Factor variables in a regression command |
Date | Sat, 01 May 2010 01:27:44 -0400 |
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, this is the output I get from running two different regressions: . 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 ---------------------------------------------------------------------------- . 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 ----------------------------------------------------------------------------