Two Examples of ANOVA

Two Examples of ANOVA

<p> Two Examples of ANOVA</p><p>Example 1: This is the age (response variable) by diagnosis (factor or explanatory variable) that was discussed in lecture on 5 Nov. I recoded the diagnosis codes as 0=Normal, 1=ACIS, and 2=AdCa. I entered the data into Minitab and performed the 1- way ANOVA (Stat → ANOVA → 1-way). I pressed the Graphs button and selected Boxplots of Data, Histograms of Residuals, Normal Plot of Residuals, and Residuals vs. Fits. In this case, Residuals vs. Order is meaningless since I don’t have the original order the observations were taken in. The results of the ANOVA are</p><p>One-way Analysis of Variance</p><p>Analysis of Variance for Age Source DF SS MS F P Diag 2 753 377 2.91 0.061 Error 67 8675 129 Total 69 9428 Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev --+------+------+------+---- 0 13 46.08 15.28 (------*------) 1 38 37.84 8.99 (------*------) 2 19 42.58 12.66 (------*------) --+------+------+------+---- Pooled StDev = 11.38 35.0 40.0 45.0 50.0</p><p>Here are the Graphs that were produced: Normal Score</p><p>Diag Age -1.0 -0.5 -2.5 -2.0 -1.5 0.0 0.5 1.0 1.5 2.0 2.5 20 30 40 50 60 70 80 -20 Normal Probability Plot of the Residuals the of Plot Probability Normal </p><p>0 -10 (means are indicated by solid circles) solid by indicated are (means Boxplots of Age by Diag by Age of Boxplots (response is Age) is (response 0 Residual</p><p>1 10 20</p><p>30 2 40 Histogram of the Residuals (response is Age)</p><p>20 y c n e</p><p> u 10 q e r F</p><p>0</p><p>-30 -20 -10 0 10 20 30 40 Residual</p><p>Residuals Versus the Fitted Values (response is Age)</p><p>40</p><p>30</p><p>20 l a</p><p> u 10 d i s e</p><p>R 0</p><p>-10</p><p>-20</p><p>37.5 38.5 39.5 40.5 41.5 42.5 43.5 44.5 45.5 46.5 Fitted Value</p><p>The Boxplots suggest the variances may not be equal. Computing the variances by the different diagnostic categories (Stat → Basic Statistics → Display Descriptive Statistics, then select Age for Variables, check By Variable, and select Diag): Descriptive Statistics</p><p>Variable Diag N Mean Median TrMean StDev Age 0 13 46.08 46.00 46.18 15.28 1 38 37.84 36.00 37.12 8.99 2 19 42.58 39.00 41.47 12.66</p><p>Variable Diag SE Mean Minimum Maximum Q1 Q3 Age 0 4.24 23.00 68.00 30.50 58.00 1 1.46 25.00 62.00 31.75 40.50 2 2.90 26.00 78.00 34.00 50.00</p><p>The ratio of the largest to smallest sample variance is (15.28/8.99)2 ≈ 2.9, which is a little problematic. The histogram and normal probability plot suggest that data may depart some from normality, but this is less problematic than the unequal variances.</p><p>Example 2: In this data set, we have a sample of patients with spinal injuries. The response variable is total hospital charge. The factor is “Financial Code” group, meaning basically type of insurance or method for payment (1 = Commercial Insurance, 2 = HMO, 3 = Medicaid, 4 = Medicare, 5 = Non-Resource (uninsured or self-insured), and 6 = PPO). The numbers of observations within each class:</p><p>Summary Statistics for Discrete Variables</p><p> group Count 1 396 2 74 3 82 4 61 5 190 6 97 N= 900</p><p>A 1-way ANOVA on the raw data, with the plots:</p><p>One-way Analysis of Variance</p><p>Analysis of Variance for charge Source DF SS MS F P group 5 3.351E+11 6.702E+10 9.22 0.000 Error 894 6.500E+12 7.271E+09 Total 899 6.835E+12 Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev -----+------+------+------+- 1 396 41218 58974 (--*--) 2 74 34875 108495 (------*-----) 3 82 107746 122656 (-----*-----) 4 61 48728 75372 (------*------) 5 190 44153 70314 (---*---) 6 97 58861 135911 (-----*----) -----+------+------+------+- Pooled StDev = 85270 30000 60000 90000 120000</p><p>I made the font smaller so that everything fit without line wraparound.</p><p>Boxplots of charge by group (means are indicated by solid circles)</p><p>1000000 e g r a h</p><p> c 500000</p><p>0</p><p> group 1 2 3 4 5 6 Histogram of the Residuals (response is charge)</p><p>400</p><p>300 y c n e</p><p> u 200 q e r F</p><p>100</p><p>0</p><p>0 500000 1000000 Residual</p><p>Normal Probability Plot of the Residuals (response is charge)</p><p>3</p><p>2 e</p><p> r 1 o c S</p><p> l 0 a m r</p><p> o -1 N</p><p>-2</p><p>-3</p><p>0 500000 1000000 Residual Residuals Versus the Fitted Values (response is charge)</p><p>1000000 l a u d i</p><p> s 500000 e R</p><p>0</p><p>40000 50000 60000 70000 80000 90000 100000 110000 Fitted Value</p><p>Residuals Versus the Order of the Data (response is charge)</p><p>1000000 l a u d i</p><p> s 500000 e R</p><p>0</p><p>100 200 300 400 500 600 700 800 900 Observation Order</p><p>I also ran the analysis, but using the logarithm of the hospital charge as the response variable. Here are the results:</p><p>One-way Analysis of Variance Analysis of Variance for logcharg Source DF SS MS F P group 5 17.047 3.409 10.84 0.000 Error 894 281.169 0.315 Total 899 298.216 Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev ----+------+------+------+-- 1 396 4.3025 0.5312 (-*-) 2 74 4.0397 0.5969 (-----*----) 3 82 4.6809 0.6443 (----*----) 4 61 4.2820 0.6095 (----*-----) 5 190 4.3233 0.5328 (--*--) 6 97 4.3833 0.5962 (---*----) ----+------+------+------+-- Pooled StDev = 0.5608 4.00 4.25 4.50 4.75</p><p>Here are the Plots: Frequency group logcharge 20 30 40 50 60 70 10 3 4 5 6 0</p><p>1 -1 Boxplots of logcharg by group by logcharg of Boxplots Histogram of the Residuals the of Histogram (means are indicated by solid circles) solid by indicated are (means 2 (response is logcharg) is (response</p><p>0 3 Residual</p><p>4 1</p><p>5</p><p>6 2 Normal Probability Plot of the Residuals (response is logcharg)</p><p>3</p><p>2 e r 1 o c S l 0 a m r o -1 N</p><p>-2</p><p>-3</p><p>-1 0 1 2 Residual</p><p>Residuals Versus the Fitted Values (response is logcharg)</p><p>2</p><p>1 l a u d i s e 0 R</p><p>-1</p><p>4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 Fitted Value Residuals Versus the Order of the Data (response is logcharg)</p><p>2</p><p>1 l a u d i s e 0 R</p><p>-1</p><p>100 200 300 400 500 600 700 800 900 Observation Order</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us