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]

Re-Post: Stata 11 - Factor variables in a regression command


From   Ricardo Basurto <ricardobasurto@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re-Post: Stata 11 - Factor variables in a regression command
Date   Sat, 1 May 2010 01:38:52 -0400

I apologize for the re-posting.  My original message was split in two
and parts of it were cut out. I hope submitting directly from within
Gmail will solve the problem. Original message below:

============================================================

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




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