11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

286 [ U ] 20 Estimation and postestimation commandsConsider an analysis of variance of the change in systolic blood pressure as determined by one offour drug treatments and adjusting for the patient’s disease (Afifi and Azen 1979).. use http://www.stata-press.com/data/r11/systolic(Systolic Blood Pressure Data). tabulate drug diseasePatient’s DiseaseDrug Used 1 2 3 Total1 6 4 5 152 5 4 6 153 3 5 4 124 5 6 5 16Total 19 19 20 58. anova systolic drug##diseaseNumber of obs = 58 R-squared = 0.4560Root MSE = 10.5096 Adj R-squared = 0.3259Source Partial SS df MS F Prob > FModel 4259.33851 11 387.212591 3.51 0.0013drug 2997.47186 3 999.157287 9.05 0.0001disease 415.873046 2 207.936523 1.88 0.1637drug#disease 707.266259 6 117.87771 1.07 0.3958Residual 5080.81667 46 110.452536Total 9340.15517 57 163.862371Despite having randomized on drug, we see in the tabulation that our data are not balanced—forexample, 12 patients were administered drug 3, whereas 16 were administered drug 4. The diseasesare also not balanced across drugs. To estimate the marginal mean for each level of drug while treatingthe design as though it were balanced, we type. margins drug, asbalancedAdjusted predictions Number of obs = 58Expression : Linear prediction, predict()at : drug (asbalanced)disease(asbalanced)Delta-methodMargin Std. Err. z P>|z| [95% Conf. Interval]drug1 25.99444 2.751008 9.45 0.000 20.60257 31.386322 26.55556 2.751008 9.65 0.000 21.16368 31.947433 9.744444 3.100558 3.14 0.002 3.667462 15.821434 13.54444 2.637123 5.14 0.000 8.375778 18.71311Assuming everyone in the sample were treated with drug 4 and that the diseases were equallydistributed across the drug treatments, the expected mean change in pressure resulting from treatmentwith drug 4 is 13.54. Because we are treating the data as balanced, we could also say that 13.54 isthe expected mean change resulting from drug 4 for any sample where an equal number of patientshas each of the three diseases.If we want an estimate of the mean that uses the distribution of diseases observed in the sample,we would remove the asbalanced option:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!