-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path07_testing-ratio.sas
57 lines (50 loc) · 974 Bytes
/
07_testing-ratio.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
DATE: 04/12/2018
AUTHOR: MINHYUK NAM
PURPOSE: Testing
NOTES:
1) Use FREQ
*/
/*****CREATING DATASET*****/
DATA goods;
INPUT state $ count @@;
CARDS;
Poor 54 Good 346
;
DATA support;
INPUT gender $ yesno $ count @@;
CARDS;
남자 YES 110 남자 NO 140
여자 YES 104 여자 NO 96
;
DATA exam;
INPUT pre $ post $ count @@;
CARDS;
YES YES 63 YES NO 4
NO YES 21 NO NO 12
;
RUN;
/*****PROC FREQ*****/
/*ci*/
PROC FREQ data = goods order = data;
weight count; /*since the given data is not */
exact binomial; /*to define a distribution*/
tables state / binomial (p = 0.15) alpha = 0.05;
RUN;
/*indep*/
PROC FREQ data = support order = data;
weight count;
tables gender * yesno / fisher chisq nopercent nocol;
RUN;
/*dep*/
PROC FREQ data = exam;
weight count;
exact mcnem; /*cannot be used as option*/
tables pre * post;
RUN;
/*dep - wrong case*/
PROC FREQ data = exam;
weight count;
exact fisher; /*cannot be used as option*/
tables pre * post;
RUN;