------------------------------------------------------------------------------- log: :acomp hd (2001-02):save stuff here (temporary):class 4.log log type: text opened on: 7 Oct 2002, 13:29:47 . label define edlbl 1 " tbplus:" . table hed wed, contents (sum count) row col ------------------------------------------------------------ | wed hed | chi2 = . Log likelihood = -221501.22 Pseudo R2 = -0.0000 ------------------------------------------------------------------------------ count | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 10.39578 .0013821 7521.99 0.000 10.39308 10.39849 ------------------------------------------------------------------------------ . *The first likelihood ratio test compares to the constant only model, so here tha > t comparison has 0 df. . poisgof Goodness-of-fit chi2 = 442816.4 Prob > chi2(15) = 0.0000 . predict constonly (option n assumed; predicted number of events) . table hed wed, contents (sum constonly) row col ------------------------------------------------------------ | wed hed | ng. . desmat: poisson count hed wed ------------------------------------------------------------------------------- poisson ------------------------------------------------------------------------------- Dependent variable count Number of observations: 16 Initial log likelihood: -221501.223 Log likelihood: -113882.425 LR chi square: 215237.595 Model degrees of freedom: 6 Pseudo R-squared: 0.486 Prob: 0.000 ------------------------------------------------------------------------------- nr Effect Coeff s.e. ------------------------------------------------------------------------------- count hed 1 HS 1.072** 0.004 2 some col 0.595** 0.005 3 BA+ 0.235** 0.005 wed 4 HS 1.229** 0.004 5 some col 0.733** 0.005 6 BA+ 0.142** 0.005 7 _cons 9.187** 0.005 ------------------------------------------------------------------------------- * p < .05 ** p < .01 . poisgof Goodness-of-fit chi2 = 227578.9 Prob > chi2(9) = 0.0000 . predict indeponly (option n assumed; predicted number of events) . table hed wed, contents (sum indeponly) row col ------------------------------------------------------------ | wed hed | nsistency's sake. . *The question is, where does this independence model fit the data exactly? . *This model, the no-interaction model reproduces the marginal counts exactly, and > makes the assumption that the interior counts are just the product of row and co > lumn probabilities, times the whole sample size. This is like the excel exercise > you did in HW 1 . save ":AComp HD (2001-02):Save Stuff Here (Temporary):husb ed by wife ed.dta" file :AComp HD (2001-02):Save Stuff Here (Temporary):husb ed by wife ed.dta saved . gen edendogamy=0 . replace edendogamy=1 if hed==wed (4 real changes made) . table hed wed, contents(edendogamy) edendogamy invalid or requires argument r(198); . table hed wed, contents(sum edendogamy) -------------------------------------------------- | wed hed | me ed group as yourself are higher, log odds about 1.11 higher and odds about 3x > higher. . poisgof Goodness-of-fit chi2 = 83703.13 Prob > chi2(8) = 0.0000 . display exp(1.115) 3.0495682 . predict oneintterm (option n assumed; predicted number of events) . table hed wed, contents(sum oneintterm) row col ------------------------------------------------------------ | wed hed | on the marginals because it has the independence terms in it. It also ensures t > hat the sum total of the diagonal cells is the same as the sum total of those cel > ls in the real data, but that's hard to see. . display 26426+147304+73458+35559 282747 . display 32016+137876+61633+18195 249720 . *Trust me, these are supposed to be the same. . *Now we're going to create one final model that tests the proposition that all ed > ucational groups have the same level of endogamy, in log odds terms. . gen edinter=0 . replace edinter=hed if hed==wed (4 real changes made) . table hed wed, contents(sum edinter) row col ------------------------------------------------------------ | wed hed | y, and in the lowest educational category. . poisgof Goodness-of-fit chi2 = 47932.55 Prob > chi2(5) = 0.0000 . predict fulledendog (option n assumed; predicted number of events) . table hed wed, contents(sum fulledendog) row col ------------------------------------------------------------ | wed hed |