Getting Started Example 2 for PROC NLMIXED
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: nlmgs2 */
/* TITLE: Getting Started Example 2 for PROC NLMIXED */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: Logistic-normal model */
/* Binomial data */
/* Multi-center clinical trial */
/* PROCS: NLMIXED */
/* DATA: Beitler and Landis (1985) */
/* */
/* SUPPORT: Oliver Schabenberger */
/* REF: */
/* MISC: */
/****************************************************************/
data infection;
input clinic t x n;
datalines;
1 1 11 36
1 0 10 37
2 1 16 20
2 0 22 32
3 1 14 19
3 0 7 19
4 1 2 16
4 0 1 17
5 1 6 17
5 0 0 12
6 1 1 11
6 0 0 10
7 1 1 5
7 0 1 9
8 1 4 6
8 0 6 7
;
proc nlmixed data=infection;
parms beta0=-1 beta1=1 s2u=2;
eta = beta0 + beta1*t + u;
expeta = exp(eta);
p = expeta/(1+expeta);
model x ~ binomial(n,p);
random u ~ normal(0,s2u) subject=clinic;
predict eta out=eta;
estimate '1/beta1' 1/beta1;
run;