log type:  text

 opened on:  24 Oct 2005, 11:06:36

 

. use "C:\AAA Miker Files\newer web pages\soc_388_notes\Qian 80-90 intermar.dta", clear

 

. * This is Qian's dataset

. describe

 

Contains data from C:\AAA Miker Files\newer web pages\soc_388_notes\Qian 80-90 intermar.dta

  obs:           512                          

 vars:             6                          16 Oct 2001 11:12

 size:        10,752 (99.9% of memory free)

-------------------------------------------------------------------------------

              storage  display     value

variable name   type   format      label      variable label

-------------------------------------------------------------------------------

mfulleth        str5   %9s                   

med4            byte   %8.0g                 

ffulleth        str5   %9s                    

fed4            byte   %8.0g                 

count           long   %12.0g                 COUNT

year            byte   %8.0g                 

-------------------------------------------------------------------------------

Sorted by:  year  med4  fed4 

 

. tabulate mfulleth [fweight=count]

 

   mfulleth |      Freq.     Percent        Cum.

------------+-----------------------------------

      Asian |        742        0.14        0.14

       Hisp |     22,925        4.38        4.52

      black |     36,429        6.96       11.48

      white |    463,446       88.52      100.00

------------+-----------------------------------

      Total |    523,542      100.00

 

. tabulate med4 [fweight=count]

 

       med4 |      Freq.     Percent        Cum.

------------+-----------------------------------

          1 |     74,785       14.28       14.28

          2 |    218,475       41.73       56.01

          3 |    135,645       25.91       81.92

          4 |     94,637       18.08      100.00

------------+-----------------------------------

      Total |    523,542      100.00

 

. display 4*4*4*4*2

512

 

. *The first model is the everything is independent from everything model

. desmat: poisson count  mfulleth med4 ffulleth fed4 year

------------------------------------------------------------------------------------------

   Poisson regression

------------------------------------------------------------------------------------------

   Dependent variable                                                               count

   Optimization:                                                                       ml

   Number of observations:                                                            512

   Initial log likelihood:                                                   -1402408.286

   Log likelihood:                                                            -289165.150

   LR chi square:                                                             2226486.273

   Model degrees of freedom:                                                           13

   Pseudo R-squared:                                                                0.794

   Prob:                                                                            0.000

------------------------------------------------------------------------------------------

nr Effect                                                               Coeff        s.e.

------------------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                             3.431**     0.037

2      black                                                            3.894**     0.037

3      white                                                            6.437**     0.037

     med4

4      2                                                                1.072**     0.004

5      3                                                                0.595**     0.005

6      4                                                                0.235**     0.005

     ffulleth

7      Hisp                                                             3.262**     0.035

8      black                                                            3.695**     0.034

9      white                                                            6.281**     0.034

     fed4

10     2                                                                1.229**     0.004

11     3                                                                0.733**     0.005

12     4                                                                0.142**     0.005

     year

13     90                                                              -0.415**     0.003

14   _cons                                                             -4.279**     0.050

------------------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. set linesize 79

 

. poisgof

 

         Goodness-of-fit chi2  =  576133.3

         Prob > chi2(498)      =    0.0000

 

. *How about some of the relevant second order interactions

. desmat: poisson count  mfulleth*med4 ffulleth*fed4 med4*year fed4*year

-------------------------------------------------------------------------------

   Poisson regression

-------------------------------------------------------------------------------

   Dependent variable                                                    count

   Optimization:                                                            ml

   Number of observations:                                                 512

   Initial log likelihood:                                        -1402408.286

   Log likelihood:                                                 -273859.008

   LR chi square:                                                  2257098.556

   Model degrees of freedom:                                                37

   Pseudo R-squared:                                                     0.805

   Prob:                                                                 0.000

-------------------------------------------------------------------------------

nr Effect                                                    Coeff        s.e.

-------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                  5.740**     0.219

2      black                                                 5.804**     0.219

3      white                                                 7.978**     0.218

     med4

4      2                                                     1.871**     0.235

5      3                                                     2.314**     0.227

6      4                                                     2.790**     0.225

     mfulleth.med4

7      Hisp.2                                               -1.506**     0.235

8      Hisp.3                                               -2.624**     0.228

9      Hisp.4                                               -4.150**     0.226

10     black.2                                              -0.972**     0.235

11     black.3                                              -2.149**     0.228

12     black.4                                              -3.553**     0.226

13     white.2                                              -0.701**     0.235

14     white.3                                              -1.786**     0.227

15     white.4                                              -2.413**     0.225

     ffulleth

16     Hisp                                                  5.193**     0.172

17     black                                                 5.137**     0.172

18     white                                                 7.415**     0.172

     fed4

19     2                                                     1.740**     0.186

20     3                                                     1.839**     0.182

21     4                                                     2.242**     0.179

     ffulleth.fed4

22     Hisp.2                                               -1.235**     0.187

23     Hisp.3                                               -2.235**     0.183

24     Hisp.4                                               -3.838**     0.182

25     black.2                                              -0.708**     0.187

26     black.3                                              -1.550**     0.182

27     black.4                                              -2.896**     0.180

28     white.2                                              -0.400*      0.186

29     white.3                                              -1.297**     0.182

30     white.4                                              -2.123**     0.179

     year

31     90                                                   -0.666**     0.011

     med4.year

32     2.90                                                 -0.067**     0.009

33     3.90                                                  0.346**     0.009

34     4.90                                                  0.001       0.010

     fed4.year

35     2.90                                                 -0.103**     0.009

36     3.90                                                  0.620**     0.010

37     4.90                                                  0.365**     0.011

38   _cons                                                  -7.009**     0.278

-------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. poisgof

 

         Goodness-of-fit chi2  =    545521

         Prob > chi2(474)      =    0.0000

 

. *There are 10 possible combinations of 2nd order interactions if you have 5 variables, 5*4/2, divided by 2 because we don't care about the order

. * Here we were looking at 4 of those 10 possible combinations

. *Desmat builds the interactions hierarchically by default, that is it includes all lower order interactions automatically unless you tell it otherwise.

. *Second of all, repetitive terms are dropped- we had two interactions with year, but the direct effects of year were only included once.

. desmat: poisson count  mfulleth*med4 ffulleth*fed4 med4*year fed4*year, verbose

 

Desmat generated the following design matrix:

 

nr   Variables       Term                        Parameterization

     First    Last

 

 1    _x_1    _x_3   mfulleth                    ind(1)

 2    _x_4    _x_6   med4                        ind(1)

 3    _x_7   _x_15   mfulleth.med4               ind(1).ind(1)

 4   _x_16   _x_18   ffulleth                    ind(1)

 5   _x_19   _x_21   fed4                        ind(1)

 6   _x_22   _x_30   ffulleth.fed4               ind(1).ind(1)

 7   _x_31           year                        ind(80)

 8   _x_32   _x_34   med4.year                   ind(1).ind(80)

 9   _x_35   _x_37   fed4.year                   ind(1).ind(80)

 

Iteration 0:   log likelihood =   -1105130 

Iteration 1:   log likelihood = -539645.18 

Iteration 2:   log likelihood = -304737.23 

Iteration 3:   log likelihood = -274369.14 

Iteration 4:   log likelihood = -273879.28 

Iteration 5:   log likelihood = -273859.67 

Iteration 6:   log likelihood = -273859.01 

Iteration 7:   log likelihood = -273859.01 

 

Poisson regression                                Number of obs   =        512

                                                  LR chi2(37)     = 2257098.56

                                                  Prob > chi2     =     0.0000

Log likelihood = -273859.01                       Pseudo R2       =     0.8047

 

------------------------------------------------------------------------------

       count |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

        _x_1 |   5.739566   .2185604    26.26   0.000     5.311195    6.167936

        _x_2 |   5.804343   .2185384    26.56   0.000     5.376016    6.232671

        _x_3 |     7.9784   .2182472    36.56   0.000     7.550643    8.406157

        _x_4 |   1.870895   .2348303     7.97   0.000     1.410636    2.331154

        _x_5 |    2.31376    .227366    10.18   0.000     1.868131     2.75939

        _x_6 |   2.789941   .2248429    12.41   0.000     2.349257    3.230625

        _x_7 |  -1.505677   .2353645    -6.40   0.000    -1.966983   -1.044371

        _x_8 |  -2.624426   .2280659   -11.51   0.000    -3.071427   -2.177425

        _x_9 |  -4.150211   .2264714   -18.33   0.000    -4.594087   -3.706335

       _x_10 |  -.9720078   .2352398    -4.13   0.000    -1.433069   -.5109463

       _x_11 |  -2.148525   .2278797    -9.43   0.000    -2.595161   -1.701889

       _x_12 |  -3.552744   .2258113   -15.73   0.000    -3.995326   -3.110162

       _x_13 |  -.7010277   .2348528    -2.98   0.003    -1.161331   -.2407247

       _x_14 |  -1.785697   .2273878    -7.85   0.000    -2.231369   -1.340025

       _x_15 |  -2.412682   .2248711   -10.73   0.000    -2.853421   -1.971942

       _x_16 |   5.192956   .1719743    30.20   0.000     4.855893     5.53002

       _x_17 |   5.136835   .1720017    29.87   0.000     4.799718    5.473952

       _x_18 |   7.415298   .1715501    43.23   0.000     7.079066    7.751531

       _x_19 |   1.740136   .1864657     9.33   0.000      1.37467    2.105602

       _x_20 |   1.839102   .1816897    10.12   0.000     1.482997    2.195208

       _x_21 |   2.242404   .1792553    12.51   0.000      1.89107    2.593738

       _x_22 |  -1.235357   .1871495    -6.60   0.000    -1.602163   -.8685506

       _x_23 |  -2.234654   .1826073   -12.24   0.000    -2.592558    -1.87675

       _x_24 |  -3.838236   .1815907   -21.14   0.000    -4.194148   -3.482325

       _x_25 |  -.7079302   .1870721    -3.78   0.000    -1.074585   -.3412757

       _x_26 |   -1.54954   .1823952    -8.50   0.000    -1.907028   -1.192052

       _x_27 |  -2.895551   .1804844   -16.04   0.000    -3.249294   -2.541808

       _x_28 |  -.4003496   .1864989    -2.15   0.032    -.7658807   -.0348184

       _x_29 |  -1.296759   .1817184    -7.14   0.000    -1.652921   -.9405977

       _x_30 |  -2.122822   .1792924   -11.84   0.000    -2.474229   -1.771416

       _x_31 |  -.6655906   .0106087   -62.74   0.000    -.6863833   -.6447979

       _x_32 |  -.0671178   .0087363    -7.68   0.000    -.0842405    -.049995

       _x_33 |   .3463791   .0092862    37.30   0.000     .3281785    .3645796

       _x_34 |   .0007133    .010067     0.07   0.944    -.0190177    .0204443

       _x_35 |  -.1033578   .0091227   -11.33   0.000     -.121238   -.0854777

       _x_36 |   .6204118   .0095909    64.69   0.000      .601614    .6392096

       _x_37 |   .3645222   .0107398    33.94   0.000     .3434725     .385572

       _cons |  -7.009354   .2775615   -25.25   0.000    -7.553365   -6.465343

------------------------------------------------------------------------------

-------------------------------------------------------------------------------

   Poisson regression

-------------------------------------------------------------------------------

   Dependent variable                                                    count

   Optimization:                                                            ml

   Number of observations:                                                 512

   Initial log likelihood:                                        -1402408.286

   Log likelihood:                                                 -273859.008

   LR chi square:                                                  2257098.556

   Model degrees of freedom:                                                37

   Pseudo R-squared:                                                     0.805

   Prob:                                                                 0.000

-------------------------------------------------------------------------------

nr Effect                                                    Coeff        s.e.

-------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                  5.740**     0.219

2      black                                                 5.804**     0.219

3      white                                                 7.978**     0.218

     med4

4      2                                                     1.871**     0.235

5      3                                                     2.314**     0.227

6      4                                                     2.790**     0.225

     mfulleth.med4

7      Hisp.2                                               -1.506**     0.235

8      Hisp.3                                               -2.624**     0.228

9      Hisp.4                                               -4.150**     0.226

10     black.2                                              -0.972**     0.235

11     black.3                                              -2.149**     0.228

12     black.4                                              -3.553**     0.226

13     white.2                                              -0.701**     0.235

14     white.3                                              -1.786**     0.227

15     white.4                                              -2.413**     0.225

     ffulleth

16     Hisp                                                  5.193**     0.172

17     black                                                 5.137**     0.172

18     white                                                 7.415**     0.172

     fed4

19     2                                                     1.740**     0.186

20     3                                                     1.839**     0.182

21     4                                                     2.242**     0.179

     ffulleth.fed4

22     Hisp.2                                               -1.235**     0.187

23     Hisp.3                                               -2.235**     0.183

24     Hisp.4                                               -3.838**     0.182

25     black.2                                              -0.708**     0.187

26     black.3                                              -1.550**     0.182

27     black.4                                              -2.896**     0.180

28     white.2                                              -0.400*      0.186

29     white.3                                              -1.297**     0.182

30     white.4                                              -2.123**     0.179

     year

31     90                                                   -0.666**     0.011

     med4.year

32     2.90                                                 -0.067**     0.009

33     3.90                                                  0.346**     0.009

34     4.90                                                  0.001       0.010

     fed4.year

35     2.90                                                 -0.103**     0.009

36     3.90                                                  0.620**     0.010

37     4.90                                                  0.365**     0.011

38   _cons                                                  -7.009**     0.278

-------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. *You nearly always want to build these models hierarchically, but if for some reason you absolutely want to make a second order interaction without the lower order terms being included, you replace the asterisk with the period in desmat

. desmat: poisson count  mfulleth*med4 ffulleth*fed4 med4.year fed4.year, verbose

 

Desmat generated the following design matrix:

 

nr   Variables       Term                        Parameterization

     First    Last

 

 1    _x_1    _x_3   mfulleth                    ind(1)

 2    _x_4    _x_6   med4                        ind(1)

 3    _x_7   _x_15   mfulleth.med4               ind(1).ind(1)

 4   _x_16   _x_18   ffulleth                    ind(1)

 5   _x_19   _x_21   fed4                        ind(1)

 6   _x_22   _x_30   ffulleth.fed4               ind(1).ind(1)

 7   _x_31   _x_33   med4.year                   ind(1).ind(80)

 8   _x_34   _x_36   fed4.year                   ind(1).ind(80)

 

Iteration 0:   log likelihood = -1109177.2 

Iteration 1:   log likelihood = -541904.76 

Iteration 2:   log likelihood = -305926.71 

Iteration 3:   log likelihood = -276338.13 

Iteration 4:   log likelihood = -275895.07 

Iteration 5:   log likelihood = -275884.43 

Iteration 6:   log likelihood = -275884.32 

Iteration 7:   log likelihood = -275884.32 

 

Poisson regression                                Number of obs   =        512

                                                  LR chi2(36)     = 2253047.93

                                                  Prob > chi2     =     0.0000

Log likelihood = -275884.32                       Pseudo R2       =     0.8033

 

------------------------------------------------------------------------------

       count |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

        _x_1 |   5.739638   .2185683    26.26   0.000     5.311252    6.168024

        _x_2 |   5.804416   .2185464    26.56   0.000     5.376073    6.232759

        _x_3 |   7.978473   .2182551    36.56   0.000     7.550701    8.406245

        _x_4 |    2.01404   .2348321     8.58   0.000     1.553778    2.474302

        _x_5 |   2.456906   .2273679    10.81   0.000     2.011273    2.902538

        _x_6 |   2.933087   .2248448    13.04   0.000     2.492399    3.373774

        _x_7 |   -1.50575   .2353719    -6.40   0.000     -1.96707   -1.044429

        _x_8 |  -2.624498   .2280735   -11.51   0.000    -3.071514   -2.177482

        _x_9 |  -4.150284    .226479   -18.33   0.000    -4.594175   -3.706393

       _x_10 |  -.9720805   .2352471    -4.13   0.000    -1.433156   -.5110045

       _x_11 |  -2.148598   .2278872    -9.43   0.000    -2.595248   -1.701947

       _x_12 |  -3.552817   .2258189   -15.73   0.000    -3.995414    -3.11022

       _x_13 |  -.7011004   .2348602    -2.99   0.003    -1.161418   -.2407829

       _x_14 |   -1.78577   .2273954    -7.85   0.000    -2.231456   -1.340083

       _x_15 |  -2.412754   .2248788   -10.73   0.000    -2.853509      -1.972

       _x_16 |   5.192957   .1719743    30.20   0.000     4.855893     5.53002

       _x_17 |   5.136836   .1720017    29.87   0.000     4.799719    5.473953

       _x_18 |   7.415299   .1715502    43.23   0.000     7.079067    7.751531

       _x_19 |   1.890149   .1864579    10.14   0.000     1.524698    2.255599

       _x_20 |   1.989115   .1816817    10.95   0.000     1.633025    2.345204

       _x_21 |   2.392416   .1792472    13.35   0.000     2.041098    2.743734

       _x_22 |  -1.235357   .1871495    -6.60   0.000    -1.602163   -.8685508

       _x_23 |  -2.234654   .1826073   -12.24   0.000    -2.592558   -1.876751

       _x_24 |  -3.838237   .1815908   -21.14   0.000    -4.194148   -3.482325

       _x_25 |  -.7079305   .1870721    -3.78   0.000    -1.074585    -.341276

       _x_26 |   -1.54954   .1823952    -8.50   0.000    -1.907028   -1.192053

       _x_27 |  -2.895551   .1804845   -16.04   0.000    -3.249294   -2.541808

       _x_28 |  -.4003499   .1864989    -2.15   0.032    -.7658811   -.0348186

       _x_29 |   -1.29676   .1817184    -7.14   0.000    -1.652921    -.940598

       _x_30 |  -2.122823   .1792924   -11.84   0.000    -2.474229   -1.771416

       _x_31 |  -.4051205   .0067792   -59.76   0.000    -.4184076   -.3918335

       _x_32 |   .0083763   .0074745     1.12   0.262    -.0062735    .0230261

       _x_33 |  -.3372895    .008425   -40.03   0.000    -.3538022   -.3207768

       _x_34 |  -.4797963   .0067201   -71.40   0.000    -.4929675   -.4666252

       _x_35 |   .2439733   .0073431    33.22   0.000      .229581    .2583655

       _x_36 |  -.0119163   .0087909    -1.36   0.175    -.0291462    .0053136

       _cons |  -7.282791   .2775407   -26.24   0.000    -7.826761   -6.738821

------------------------------------------------------------------------------

-------------------------------------------------------------------------------

   Poisson regression

-------------------------------------------------------------------------------

   Dependent variable                                                    count

   Optimization:                                                            ml

   Number of observations:                                                 512

   Initial log likelihood:                                        -1402408.286

   Log likelihood:                                                 -275884.320

   LR chi square:                                                  2253047.934

   Model degrees of freedom:                                                36

   Pseudo R-squared:                                                     0.803

   Prob:                                                                 0.000

-------------------------------------------------------------------------------

nr Effect                                                    Coeff        s.e.

-------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                  5.740**     0.219

2      black                                                 5.804**     0.219

3      white                                                 7.978**     0.218

     med4

4      2                                                     2.014**     0.235

5      3                                                     2.457**     0.227

6      4                                                     2.933**     0.225

     mfulleth.med4

7      Hisp.2                                               -1.506**     0.235

8      Hisp.3                                               -2.624**     0.228

9      Hisp.4                                               -4.150**     0.226

10     black.2                                              -0.972**     0.235

11     black.3                                              -2.149**     0.228

12     black.4                                              -3.553**     0.226

13     white.2                                              -0.701**     0.235

14     white.3                                              -1.786**     0.227

15     white.4                                              -2.413**     0.225

     ffulleth

16     Hisp                                                  5.193**     0.172

17     black                                                 5.137**     0.172

18     white                                                 7.415**     0.172

     fed4

19     2                                                     1.890**     0.186

20     3                                                     1.989**     0.182

21     4                                                     2.392**     0.179

     ffulleth.fed4

22     Hisp.2                                               -1.235**     0.187

23     Hisp.3                                               -2.235**     0.183

24     Hisp.4                                               -3.838**     0.182

25     black.2                                              -0.708**     0.187

26     black.3                                              -1.550**     0.182

27     black.4                                              -2.896**     0.180

28     white.2                                              -0.400*      0.186

29     white.3                                              -1.297**     0.182

30     white.4                                              -2.123**     0.179

     med4.year

31     2.90                                                 -0.405**     0.007

32     3.90                                                  0.008       0.007

33     4.90                                                 -0.337**     0.008

     fed4.year

34     2.90                                                 -0.480**     0.007

35     3.90                                                  0.244**     0.007

36     4.90                                                 -0.012       0.009

37   _cons                                                  -7.283**     0.278

-------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. *We lost one degree of freedom for the direct effects of year.

. poisgof

 

         Goodness-of-fit chi2  =  549571.6

         Prob > chi2(475)      =    0.0000

 

. tabulate mfulleth

 

   mfulleth |      Freq.     Percent        Cum.

------------+-----------------------------------

      Asian |        128       25.00       25.00

       Hisp |        128       25.00       50.00

      black |        128       25.00       75.00

      white |        128       25.00      100.00

------------+-----------------------------------

      Total |        512      100.00

 

. tabulate mfulleth, nolab

 

   mfulleth |      Freq.     Percent        Cum.

------------+-----------------------------------

      Asian |        128       25.00       25.00

       Hisp |        128       25.00       50.00

      black |        128       25.00       75.00

      white |        128       25.00      100.00

------------+-----------------------------------

      Total |        512      100.00

 

. gen r_endog=0

 

. replace r_endog=1 if mfulleth=="Asian" & ffulleth=="Asian"

(32 real changes made)

 

. replace r_endog=2 if mfulleth=="Hisp" & ffulleth=="Hisp"

(32 real changes made)

 

. replace r_endog=3 if mfulleth=="black" & ffulleth=="black"

(32 real changes made)

 

. replace r_endog=4 if mfulleth=="white" & ffulleth=="white"

(32 real changes made)

 

. desmat: poisson count mfulleth*med4 ffulleth*fed4 year  r_endog

-------------------------------------------------------------------------------

   Poisson regression

-------------------------------------------------------------------------------

   Dependent variable                                                    count

   Optimization:                                                            ml

   Number of observations:                                                 512

   Initial log likelihood:                                        -1402408.286

   Log likelihood:                                                 -123146.804

   LR chi square:                                                  2558522.965

   Model degrees of freedom:                                                35

   Pseudo R-squared:                                                     0.912

   Prob:                                                                 0.000

-------------------------------------------------------------------------------

nr Effect                                                    Coeff        s.e.

-------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                  5.526**     0.222

2      black                                                 3.649**     0.223

3      white                                                 6.035**     0.224

     med4

4      2                                                     1.846**     0.235

5      3                                                     2.461**     0.227

6      4                                                     2.790**     0.225

     mfulleth.med4

7      Hisp.2                                               -1.506**     0.235

8      Hisp.3                                               -2.624**     0.228

9      Hisp.4                                               -4.150**     0.226

10     black.2                                              -0.972**     0.235

11     black.3                                              -2.149**     0.228

12     black.4                                              -3.553**     0.226

13     white.2                                              -0.701**     0.235

14     white.3                                              -1.786**     0.227

15     white.4                                              -2.413**     0.225

     ffulleth

16     Hisp                                                  4.831**     0.175

17     black                                                 1.810**     0.178

18     white                                                 5.377**     0.177

     fed4

19     2                                                     1.705**     0.186

20     3                                                     2.105**     0.182

21     4                                                     2.387**     0.179

     ffulleth.fed4

22     Hisp.2                                               -1.235**     0.187

23     Hisp.3                                               -2.235**     0.183

24     Hisp.4                                               -3.838**     0.182

25     black.2                                              -0.708**     0.187

26     black.3                                              -1.550**     0.182

27     black.4                                              -2.896**     0.180

28     white.2                                              -0.400*      0.186

29     white.3                                              -1.297**     0.182

30     white.4                                              -2.123**     0.179

     year

31     90                                                   -0.415**     0.003

     r_endog

32     1                                                     4.497**     0.089

33     2                                                     2.107**     0.042

34     3                                                     6.914**     0.050

35     4                                                     2.871**     0.042

36   _cons                                                  -5.892**     0.282

-------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. poisgof

 

         Goodness-of-fit chi2  =  244096.6

         Prob > chi2(476)      =    0.0000

 

. desmat: poisson count mfulleth*med4*fed4 ffulleth*fed4*med4 year r_endog

-------------------------------------------------------------------------------

   Poisson regression

-------------------------------------------------------------------------------

   Dependent variable                                                    count

   Optimization:                                                            ml

   Number of observations:                                                 512

   Initial log likelihood:                                        -1402408.286

   Log likelihood:                                                  -10672.055

   LR chi square:                                                  2783472.463

   Model degrees of freedom:                                               116

   Pseudo R-squared:                                                     0.992

   Prob:                                                                 0.000

-------------------------------------------------------------------------------

nr Effect                                                    Coeff        s.e.

-------------------------------------------------------------------------------

   count

     mfulleth

1      Hisp                                                  5.374**     0.382

2      black                                                 3.227**     0.388

3      white                                                 5.893**     0.383

     med4

4      2                                                     0.639       0.566

5      3                                                     0.651       0.620

6      4                                                    -1.406       1.305

     mfulleth.med4

7      Hisp.2                                               -1.193*      0.470

8      Hisp.3                                               -1.907**     0.521

9      Hisp.4                                               -2.073       1.135

10     black.2                                              -0.650       0.479

11     black.3                                              -1.098*      0.538

12     black.4                                              -2.042       1.203

13     white.2                                              -0.818       0.469

14     white.3                                              -1.637**     0.519

15     white.4                                              -1.278       1.125

     fed4

16     2                                                     0.343       0.584

17     3                                                    -1.335       1.119

18     4                                                    -0.738       1.116

     mfulleth.fed4

19     Hisp.2                                               -0.881       0.482

20     Hisp.3                                                0.524       1.080

21     Hisp.4                                               -1.202       1.149

22     black.2                                              -0.600       0.491

23     black.3                                               0.987       1.088

24     black.4                                              -0.922       1.205

25     white.2                                              -0.568       0.481

26     white.3                                               0.754       1.079

27     white.4                                              -0.811       1.141

     med4.fed4

28     2.2                                                   1.901**     0.699

29     2.3                                                   3.225**     1.189

30     2.4                                                   0.520       1.283

31     3.2                                                   1.712*      0.749

32     3.3                                                   4.484**     1.207

33     3.4                                                   3.269**     1.208

34     4.2                                                   2.680       1.394

35     4.3                                                   6.282**     1.667

36     4.4                                                   6.928**     1.661

     mfulleth.med4.fed4

37     Hisp.2.2                                              0.506       0.567

38     Hisp.2.3                                             -1.314       1.127

39     Hisp.2.4                                              0.755       1.294

40     Hisp.3.2                                              0.613       0.616

41     Hisp.3.3                                             -1.314       1.141

42     Hisp.3.4                                              0.316       1.215

43     Hisp.4.2                                             -0.458       1.191

44     Hisp.4.3                                             -1.875       1.525

45     Hisp.4.4                                             -0.390       1.572

46     black.2.2                                             0.361       0.579

47     black.2.3                                            -1.549       1.138

48     black.2.4                                             0.944       1.351

49     black.3.2                                             0.335       0.635

50     black.3.3                                            -1.734       1.155

51     black.3.4                                             0.284       1.275

52     black.4.2                                             0.189       1.264

53     black.4.3                                            -1.352       1.583

54     black.4.4                                             0.055       1.662

55     white.2.2                                             0.625       0.566

56     white.2.3                                            -1.074       1.125

57     white.2.4                                             1.284       1.284

58     white.3.2                                             0.746       0.613

59     white.3.3                                            -1.024       1.139

60     white.3.4                                             0.648       1.205

61     white.4.2                                            -0.325       1.180

62     white.4.3                                            -1.472       1.516

63     white.4.4                                            -0.034       1.558

     ffulleth

64     Hisp                                                  4.401**     0.271

65     black                                                 1.628**     0.280

66     white                                                 5.213**     0.271

     ffulleth.fed4

67     Hisp.2                                               -0.016       0.409

68     Hisp.3                                               -1.071*      0.470

69     Hisp.4                                               -2.292**     0.695

70     black.2                                               0.278       0.419

71     black.3                                              -0.660       0.488

72     black.4                                              -1.463       0.781

73     white.2                                               0.330       0.408

74     white.3                                              -0.742       0.468

75     white.4                                              -1.903**     0.679

     ffulleth.med4

76     Hisp.2                                               -0.039       0.401

77     Hisp.3                                               -0.558       0.485

78     Hisp.4                                               -0.780       1.101

79     black.2                                              -0.173       0.411

80     black.3                                              -1.091*      0.503

81     black.4                                              -0.072       1.173

82     white.2                                               0.115       0.400

83     white.3                                              -0.493       0.482

84     white.4                                              -0.721       1.092

     ffulleth.fed4.med4

85     Hisp.2.2                                             -1.019*      0.514

86     Hisp.2.3                                             -0.710       0.591

87     Hisp.2.4                                             -0.028       1.186

88     Hisp.3.2                                             -0.410       0.574

89     Hisp.3.3                                             -0.003       0.627

90     Hisp.3.4                                             -0.313       1.174

91     Hisp.4.2                                              0.143       0.817

92     Hisp.4.3                                              0.140       0.816

93     Hisp.4.4                                             -0.076       1.276

94     black.2.2                                            -0.871       0.528

95     black.2.3                                            -0.507       0.612

96     black.2.4                                            -1.177       1.260

97     black.3.2                                            -0.213       0.595

98     black.3.3                                             0.253       0.653

99     black.3.4                                            -1.412       1.249

100    black.4.2                                             0.357       0.903

101    black.4.3                                             0.253       0.902

102    black.4.4                                            -0.946       1.385

103    white.2.2                                            -0.989       0.513

104    white.2.3                                            -0.536       0.588

105    white.2.4                                             0.279       1.175

106    white.3.2                                            -0.348       0.570

107    white.3.3                                             0.108       0.623

108    white.3.4                                            -0.019       1.164

109    white.4.2                                             0.519       0.799

110    white.4.3                                             0.588       0.800

111    white.4.4                                             0.625       1.259

     year

112    90                                                   -0.415**     0.003

     r_endog

113    1                                                     4.139**     0.095

114    2                                                     2.003**     0.043

115    3                                                     6.921**     0.050

116    4                                                     2.878**     0.042

117  _cons                                                  -4.370**     0.438

-------------------------------------------------------------------------------

*  p < .05

** p < .01

 

. poisgof

 

         Goodness-of-fit chi2  =  19147.11

         Prob > chi2(395)      =    0.0000

 

* See my excel file.