Data is statically generated in the script via the DATA step 'multicenter' and the DATALINES statement.
1 Code Block
DATA STEP Data
Explanation : Creation of the 'multicenter' dataset containing study results: center, treatment group, total number of patients (n), and observed number of side effects.
Copied!
data multicenter;
input center group$ n sideeffect;
datalines;
1 A 32 14
1 B 33 18
2 A 30 4
2 B 28 8
3 A 23 14
3 B 24 9
4 A 22 7
4 B 22 10
5 A 20 6
5 B 21 12
6 A 19 1
6 B 20 3
7 A 17 2
7 B 17 6
8 A 16 7
8 B 15 9
9 A 13 1
9 B 14 5
10 A 13 3
10 B 13 1
11 A 11 1
11 B 12 2
12 A 10 1
12 B 9 0
13 A 9 2
13 B 9 6
14 A 8 1
14 B 8 1
15 A 7 1
15 B 8 0
;
1
DATA multicenter;
2
INPUT center group$ n sideeffect;
3
DATALINES;
4
1 A 3214
5
1 B 3318
6
2 A 304
7
2 B 288
8
3 A 2314
9
3 B 249
10
4 A 227
11
4 B 2210
12
5 A 206
13
5 B 2112
14
6 A 191
15
6 B 203
16
7 A 172
17
7 B 176
18
8 A 167
19
8 B 159
20
9 A 131
21
9 B 145
22
10 A 133
23
10 B 131
24
11 A 111
25
11 B 122
26
12 A 101
27
12 B 9 0
28
13 A 92
29
13 B 96
30
14 A 81
31
14 B 81
32
15 A 71
33
15 B 8 0
34
;
2 Code Block
PROC GLIMMIX
Explanation : Execution of the GLIMMIX procedure. The model specifies a binomial distribution (events/trials syntax) with 'group' as a fixed effect. A random intercept is added for each 'center' to capture intra-center correlation.
Copied!
proc glimmix data=multicenter;
class center group;
model sideeffect/n = group / solution;
random intercept / subject=center;
run;
1
PROC GLIMMIXDATA=multicenter;
2
class center group;
3
model sideeffect/n = group / solution;
4
random intercept / subject=center;
5
RUN;
3 Code Block
PROC GLIMMIX
Explanation : Second execution identical to the first, but focused on displaying least squares means (LS-means). The 'ilink' option is used to report estimates on the scale of the original data (probabilities) rather than on the link scale (logit).
Copied!
ods select lsmeans;
proc glimmix data=multicenter;
class center group;
model sideeffect/n = group / solution;
random intercept / subject=center;
lsmeans group / cl ilink;
run;
1
ods select lsmeans;
2
PROC GLIMMIXDATA=multicenter;
3
class center group;
4
model sideeffect/n = group / solution;
5
random intercept / subject=center;
6
lsmeans group / cl ilink;
7
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : SAS SAMPLE LIBRARY / NAME: gmxgs1 / PRODUCT: STAT
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.