------------------------------------------------------------------------------------------------- log: C:\MyDocs\MPH\Text\SecondEdition\WebDoFiles\10.8.ERpolymorphism.log log type: text opened on: 3 Jan 2008, 17:43:52 . * 10.8.ERpolymorphism.log . * . * Do a one-way analysis of variance to determine whether age . * at breast cancer diagnosis varies with estrogen receptor (ER) . * genotype using the data of Parl et al. 1989. . * . use C:\WDDtext\10.8.ERpolymorphism.dta . ci age Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- age | 59 60.64407 1.756804 57.12744 64.16069 . by genotype: ci age ----------------------------------------------------------------------------------------------- -> genotype = 1.6/1.6 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- age | 14 64.64286 2.988269 58.1871 71.09862 ----------------------------------------------------------------------------------------------- -> genotype = 1.6/0.7 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- age | 29 64.37931 2.462234 59.33565 69.42297 ----------------------------------------------------------------------------------------------- -> genotype = 0.7/0.7 Variable | Obs Mean Std. Err. [95% Conf. Interval] -------------+--------------------------------------------------------------- age | 16 50.375 2.659691 44.706 56.044 . * . * The following stripplot command must be downloaded from the web . * prior to use. See Section 10.7 . * . stripplot age, over(genotype) boffset(-0.2) stack height(0.1) /// > box(lwidth(medthick) barwidth(0.2)) /// > xtitle(Age at Breast Cancer Diagnosis) /// > xlabel(35(5)85) xmtick(33(1)87) xsize(5) . oneway age genotype Analysis of Variance Source SS df MS F Prob > F ------------------------------------------------------------------------ Between groups 2315.73355 2 1157.86678 7.86 0.0010 Within groups 8245.79187 56 147.246283 ------------------------------------------------------------------------ Total 10561.5254 58 182.095266 Bartlett's test for equal variances: chi2(2) = 1.0798 Prob>chi2 = 0.583 . * . * Test whether the standard deviations of age are equal in . * patients with different genotypes. . * . robvar age, by(genotype) | Summary of Age at Diagnosis Genotype | Mean Std. Dev. Freq. ------------+------------------------------------ 1.6/1.6 | 64.642857 11.181077 14 1.6/0.7 | 64.37931 13.259535 29 0.7/0.7 | 50.375 10.638766 16 ------------+------------------------------------ Total | 60.644068 13.494268 59 W0 = 0.83032671 df(2, 56) Pr > F = 0.44120161 W50 = 0.60460508 df(2, 56) Pr > F = 0.54981692 W10 = 0.79381598 df(2, 56) Pr > F = 0.45713722 . * . * Repeat analysis using linear regression . * . xi: regress age i.genotype i.genotype _Igenotype_1-3 (naturally coded; _Igenotype_1 omitted) Source | SS df MS Number of obs = 59 -------------+------------------------------ F( 2, 56) = 7.86 Model | 2315.73355 2 1157.86678 Prob > F = 0.0010 Residual | 8245.79187 56 147.246283 R-squared = 0.2193 -------------+------------------------------ Adj R-squared = 0.1914 Total | 10561.5254 58 182.095266 Root MSE = 12.135 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- _Igenotype_2 | -.2635468 3.949057 -0.07 0.947 -8.174458 7.647365 _Igenotype_3 | -14.26786 4.440775 -3.21 0.002 -23.1638 -5.371915 _cons | 64.64286 3.243084 19.93 0.000 58.14618 71.13953 ------------------------------------------------------------------------------ . lincom _cons + _Igenotype_2 ( 1) _Igenotype_2 + _cons = 0 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 64.37931 2.253322 28.57 0.000 59.86536 68.89326 ------------------------------------------------------------------------------ . lincom _cons + _Igenotype_3 ( 1) _Igenotype_3 + _cons = 0 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 50.375 3.033627 16.61 0.000 44.29791 56.45209 ------------------------------------------------------------------------------ . lincom _Igenotype_3 - _Igenotype_2 ( 1) - _Igenotype_2 + _Igenotype_3 = 0 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | -14.00431 3.778935 -3.71 0.000 -21.57443 -6.434194 ------------------------------------------------------------------------------ . * . * Perform a Kruskal-Wallis analysis of variance . * . kwallis age, by(genotype) Kruskal-Wallis equality-of-populations rank test +---------------------------+ | genotype | Obs | Rank Sum | |----------+-----+----------| | 1.6/1.6 | 14 | 494.00 | | 1.6/0.7 | 29 | 999.50 | | 0.7/0.7 | 16 | 276.50 | +---------------------------+ chi-squared = 12.060 with 2 d.f. probability = 0.0024 chi-squared with ties = 12.073 with 2 d.f. probability = 0.0024 . ranksum age if genotype !=3, by(genotype) Two-sample Wilcoxon rank-sum (Mann-Whitney) test genotype | obs rank sum expected -------------+--------------------------------- 1.6/1.6 | 14 310 308 1.6/0.7 | 29 636 638 -------------+--------------------------------- combined | 43 946 946 unadjusted variance 1488.67 adjustment for ties -2.70 ---------- adjusted variance 1485.97 Ho: age(genotype==1.6/1.6) = age(genotype==1.6/0.7) z = 0.052 Prob > |z| = 0.9586 . ranksum age if genotype !=2, by(genotype) Two-sample Wilcoxon rank-sum (Mann-Whitney) test genotype | obs rank sum expected -------------+--------------------------------- 1.6/1.6 | 14 289 217 0.7/0.7 | 16 176 248 -------------+--------------------------------- combined | 30 465 465 unadjusted variance 578.67 adjustment for ties -1.67 ---------- adjusted variance 576.99 Ho: age(genotype==1.6/1.6) = age(genotype==0.7/0.7) z = 2.997 Prob > |z| = 0.0027 . ranksum age if genotype !=1, by(genotype) Two-sample Wilcoxon rank-sum (Mann-Whitney) test genotype | obs rank sum expected -------------+--------------------------------- 1.6/0.7 | 29 798.5 667 0.7/0.7 | 16 236.5 368 -------------+--------------------------------- combined | 45 1035 1035 unadjusted variance 1778.67 adjustment for ties -2.23 ---------- adjusted variance 1776.44 Ho: age(genotype==1.6/0.7) = age(genotype==0.7/0.7) z = 3.120 Prob > |z| = 0.0018 . kwallis age if genotype !=1, by(genotype) Kruskal-Wallis equality-of-populations rank test +---------------------------+ | genotype | Obs | Rank Sum | |----------+-----+----------| | 1.6/0.7 | 29 | 798.50 | | 0.7/0.7 | 16 | 236.50 | +---------------------------+ chi-squared = 9.722 with 1 d.f. probability = 0.0018 chi-squared with ties = 9.734 with 1 d.f. probability = 0.0018 . log close log: C:\MyDocs\MPH\Text\SecondEdition\WebDoFiles\10.8.ERpolymorphism.log log type: text closed on: 3 Jan 2008, 17:43:55 -----------------------------------------------------------------------------------------------