13.07.2015 Views

STA 138 Categorical Data Analysis: Homework 3 - Statistics

STA 138 Categorical Data Analysis: Homework 3 - Statistics

STA 138 Categorical Data Analysis: Homework 3 - Statistics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2.22 Psychiatric treatmentDiagnosisSchizophreniaAffective DisorderNeurosisPersonality DisorderSpecial SymptomsTotalDrugs105(74.5145)12(9.2319)18(24.3986)47(65.2826)0(8.5725)182No Drugs8(38.4855)2(3.7681 )Total1131419 37(12.6014)52(33.7174)13(4.4275)949913276Observed(Expected)a. Ho: 7rij p,ijVi E [I,5],j E [1,2] .Ha : 7rij i=- J.Lij for some i E [1, 5],j E [1,2] .The test statistic for a Pearson X 2 is= 84.1885.df (5-1)(2-1) 4.p-value 2.2549 x 10- 17 .We reject the null hypothesis of independence between diagnosis and treatment at the a = 0.05 level,with a p-value < 0.0001. Diagnosis is significantly associated with treatment.Note that these observations may not be amenable to a X 2 test for independence because of thesmall expected and observed counts in some of the cells (less than 5 in multiple cells and a a count inindividuals who exhibit "special symptoms" and are being treated with drugs).Fisher's Exact Test on this contingency table (performed using R statistical software) gives a p-valueof < 2.2 x 10- 16 , which is similar to the X2 p-value, and yields the same conclusion: reject the nullhypothesis. The log likelihood statistic, G 2 , could not be used for this test because of the 0 observation.b. See the table on the next page for the final standardized residual values.The standardized residuals range from -7.87 to 7.87, a surprisingly large range under the null hy­pothesis for such a small number of cells in the table. Under the null hypothesis, the most surprising positive residual is due to the much larger observed count of schizophrenic individuals who are being treated with drugs. Similarly, the number of "special symptoms" and personality disorder individuals who are not being treated with drugs is much larger than expected. :From the table, it is also clear that a positive residual for a group under one treatment will necessarily impose an equal and opposite residual for the same group under the other treatment.


DiagnosisSchizo phreniaDrugs105(74.5145)SEll = 3.8714No Drugs8(38.4855)SEl2 3.8714Total113Pl· 0.4094Observed(Expected)CalculationsAffective Disorder7.874512(9.2319)SE21 = 1.7276-7.87452(3.7681)SE22 1.7276 P2·140.0507Standardized Residual1.6023 -1.6023(24.3986) (12.6014)SE 31 = 2.6825 SE32 2.6825 P3· 0.1341-2.3853 2.3853Personality Disorder 47 52 99(65.2826) (33.7174)SE41 3.7761 3.7761 P4· = 0.3587-4.8417 4.8417Special Symptoms 0 13 13(8.5725) (4.4275)SE 51 1.6680 1.6680 P5· = 0.0471-5.1395 5.1395= 0.6594 0.3406c. Partitioning X 2 testsi. Selecting only the first two rows:DiagnosisDrugsSchizophrenia 105(104.1024)Affective Disorder 12(12.8976)Total117No Drugs8(8.8976)2Total11314(1.1024)10 127Observed(Expected)The test statistic for this grouping is X 2 0.8917 on 1 degree of freedom. We fail to reject thenull hypothesis at the Cl: 0.05 level, with a p-value of 0.35. We do not have sufficient evidenceto conclude that treatment of schizophrenia and affective disorder differs.(17.6838) (19.3162) (Expected)Personality Disorder 47 52 99(47.3162) (51.6838)Total 65 71 136The test statistic for this grouping is X 2 = 0.0149 on 1 degree of freedom. We fail to reject the


null hypothesis at the a = 0.05 level, with a p-value of 0.90. We do not have sufficient evidenceto conclude that treatment of neurosis and personality disorder differs.iii. Combining rows 1 and 2, rows 3 and 4, and selecting row 5:Diagnosis Drugs No Drugs TotalSchizophrenia or Affective Disorder 117 10 127 Observed(83.7464) (43.2536) (Expected)Neurosis or Personality Disorder 65 71 136(89.6812) (46.3188)Special Symptoms 0 13 13(8.5725) (4.4275)Total 182 94 276The test statistic for this grouping is X 2 83.8839 on 2 degrees of freedom. We reject the nullhypothesis at the a = 0.05 level, with a p-value < 2:2 x 10- 16 . There is strong evidence that thetreatment of "special symptoms" differs from that of schizophrenia and affective disorder and/orneurosis and personality disorder.

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

Saved successfully!

Ooh no, something went wrong!