Dear all,
Am using this command:
However, no chi test gets registered. What can I do?
Am using this command:
Code:
bys Shock: ta Shock Treatment, col Chi2
tab Shock Treatment if Shock==1, col chi2
. sysuse auto (1978 Automobile Data) . gen highmpg = mpg > 27 & !missing(mpg) . tab foreign highmpg, chi2 | highmpg Car type | 0 1 | Total -----------+----------------------+---------- Domestic | 47 5 | 52 Foreign | 16 6 | 22 -----------+----------------------+---------- Total | 63 11 | 74 Pearson chi2(1) = 3.8087 Pr = 0.051 . tab foreign highmpg if foreign ==1, chi2 | highmpg Car type | 0 1 | Total -----------+----------------------+---------- Foreign | 16 6 | 22 -----------+----------------------+---------- Total | 16 6 | 22 . by foreign, sort: tab foreign highmpg, chi2 ------------------------------------------------------------------------------------------------------------ -> foreign = Domestic | highmpg Car type | 0 1 | Total -----------+----------------------+---------- Domestic | 47 5 | 52 -----------+----------------------+---------- Total | 47 5 | 52 ------------------------------------------------------------------------------------------------------------ -> foreign = Foreign | highmpg Car type | 0 1 | Total -----------+----------------------+---------- Foreign | 16 6 | 22 -----------+----------------------+---------- Total | 16 6 | 22
Comment