在使用proc genmod计算RR值,时,提示:“WARNING: More coefficients than levels specified for effect hp. Some coefficients will be ignored.”;
如果这样提示:有什么问题吗?怎么解决。程序如下,问题在图片中?
data example3_1;
input id gender age hp pro ;
cards;
1 2 0 1 0
2 1 0 1 1
3 2 1 1 1
4 1 1 0 1
5 1 1 0 0
6 1 1 1 1
7 1 1 0 0
8 2 1 0 0
9 2 1 0 0
10 1 0 0 0
11 1 1 0 0
12 2 1 0 0
13 2 1 1 0
14 2 1 0 1
15 1 1 0 0
16 2 1 0 1
17 2 1 1 1
18 1 1 0 0
19 2 1 1 0
20 1 1 1 1
21 2 1 0 0
22 2 0 1 1
23 2 1 0 0
24 2 1 1 0
25 2 0 0 0
26 1 1 1 0
27 1 1 1 1
28 2 1 1 0
29 2 1 1 1
30 2 1 1 0
31 1 1 1 1
32 2 1 0 0
33 2 0 0 1
34 2 0 0 1
35 1 0 1 1
36 1 0 1 0
37 2 1 0 0
38 1 1 1 0
39 2 1 0 1
40 2 0 0 0
41 1 0 1 1
42 2 0 1 1
43 2 0 1 0
44 1 0 0 1
45 2 1 1 1
46 2 1 1 0
47 2 0 1 1
48 2 0 0 0
49 2 0 0 0
50 2 0 1 1
51 2 1 1 1
52 2 0 1 0
53 2 0 0 0
54 1 0 1 0
55 1 0 1 1
56 1 0 1 0
57 1 0 1 0
58 2 1 0 1
59 2 0 0 0
60 2 1 1 0
61 1 0 0 1
62 2 1 0 0
63 1 1 0 1
64 1 0 1 0
65 1 0 0 0
66 1 0 0 0
67 2 0 1 0
68 2 0 1 1
69 2 1 0 1
70 2 0 1 0
71 2 1 0 0
72 2 0 0 0
73 2 0 0 0
74 1 1 1 1
75 2 1 0 0
76 1 1 1 0
77 1 1 0 1
78 2 1 1 1
79 1 1 1 0
80 1 0 0 0
81 2 1 1 1
82 2 0 0 0
83 1 0 1 0
84 1 0 1 0
85 2 1 0 0
86 1 0 0 0
87 1 0 1 1
88 2 0 1 0
89 2 1 0 0
90 2 1 0 0
91 2 0 1 1
92 2 1 1 0
93 2 0 1 0
94 1 0 1 0
95 1 0 0 0
96 1 1 1 1
97 2 1 1 0
98 2 0 1 0
99 1 1 1 1
100 2 0 0 0
run;
proc genmod desc data=example3_1;
class hp (param=reference ref=first);
**** class语句指定hp为分类变量,以first(即0)作为参照,如果不指定first,默认是ref=last,即以最后一类(即1)作为参照;
model pro=hp / dist=bin link=log ;
estimate "hp" hp 1 -1 / exp;
quit;