Presentation is loading. Please wait.

Presentation is loading. Please wait.

Proc freq: Five secrets* *Okay, well, lesser known facts.

Similar presentations


Presentation on theme: "Proc freq: Five secrets* *Okay, well, lesser known facts."— Presentation transcript:

1 Proc freq: Five secrets* *Okay, well, lesser known facts

2 They said I wasn’t that interesting

3 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

4 Proc freq getting the chi-square values & more

5 Enterprise Guide Method

6

7

8

9 The Syntax PROC FREQ DATA = mydata.oldpeople ; TABLES dthflag*nursehome / NOROW NOPERCENT NOCUM CHISQ MEASURES ;

10 Nursing home placement by death Conditional probabilities

11 Being able to find SPSS in the start menu does not qualify you to perform a multinomial logistic regression

12 1. Chi-square values

13 Chi-square results

14 Chi-square results Pearson ∑ (f o – f e ) 2 f e Pearson

15 Chi-square results

16

17 2. What is Fisher’s exact test & when do I get one?

18

19 Fisher’s Exact Test: probability of a table as unusual as the one that you have obtained under the null hypothesis of no relationship.

20 With 2 x 2 Tables it’s automatic

21 Recap: Fisher’s Exact Test Small sample size OR Need exact probability

22 3. Odds ratios

23 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

24 Measures

25 4. Mantel-Haeszel chi-square Tests ordinal relationship Same as Pearson if only two categories

26 Ordinal relationship ?

27 Don’t just compare values

28 ER visits versus nursing home

29 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.

30 Testing hypothesis π = ? PROC FREQ DATA = dsname ; TABLES varname / BINOMIAL (EXACT EQUIV P =.333) ALPHA =.05 ;

31 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 Z- value 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.

32 Different data I had lying around

33 Hmmm…. This is interesting

34 Null rejected !


Download ppt "Proc freq: Five secrets* *Okay, well, lesser known facts."

Similar presentations


Ads by Google