Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Proc freq: Five secrets* *Okay, well, lesser known facts They said I wasn’t that interesting 1. Different and similar chi-squares 2. Fisher’s Exact Test. How to get one. Why you want one 3. Odds ratios 4. When NOT to compare chi-square values directly 5. Tests of binomial proportions Proc freq getting the chi-square values & more Enterprise Guide Method Enterprise Guide Method Enterprise Guide Method Enterprise Guide Method The Syntax PROC FREQ DATA = mydata.oldpeople ; TABLES dthflag*nursehome / NOROW NOPERCENT NOCUM CHISQ MEASURES ; Nursing home placement by death Conditional probabilities Being able to find SPSS in the start menu does not qualify you to perform a multinomial logistic regression 1. Chi-square values Chi-square results Chi-square results Pearson Pearson ∑ (fo – fe)2 fe Chi-square results Chi-square results 2. What is Fisher’s exact test & when do I get one? “Well, you see, what you really need to do to make this a valid statistical test is to kill off a few more patients” Fisher’s Exact Test: probability of a table as unusual as the one that you have obtained under the null hypothesis of no relationship. With 2 x 2 Tables it’s automatic Recap: Fisher’s Exact Test • Small sample size OR • Need exact probability 3. Odds ratios Computing odds ratios Divide frequency row 1, column 1 by frequency in row 1 column 2 2,846/184 = 13.51 -- odds of a person who lived not being in a nursing home versus being in a home. Divide frequency in row 2, column 1 by frequency row 2, column 2 2,239/ 1,077 = 2.08 Divide first result by the second 13.51/ 2.08 = 6.49 Measures 4. Mantel-Haeszel chi-square Tests ordinal relationship Same as Pearson if only two categories Ordinal relationship ? Don’t just compare values ER visits versus nursing home Take-away 1. Different types of chi-square values, different types of correlations and other tests like odds ratios do exist. 2. These statistics are very easy to obtain using SAS. 3. While most times, all of these measures will point you in the direction of the same general conclusion, there are times when one is preferable to the others. Testing hypothesis π = ? • PROC FREQ DATA = dsname ; TABLES varname / BINOMIAL (EXACT EQUIV P = .333) ALPHA = .05 ; BINOMIAL (EXACT EQUIV P = .333) ALPHA = .05 ; • The binomial (equiv p = .333) will produce a test that the population proportion is .333 for the first category. That is “No” for death. A Zvalue will be produced and probabilities for one-tail and two-tailed tests. • The exact keyword will produce confidence intervals and, since I have specified alpha = .05, these will be the 95% confidence intervals. Different data I had lying around Hmmm…. This is interesting Null rejected !