Documentation Example 4 for PROC NLMIXED
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: nlmex4 */
/* TITLE: Documentation Example 4 for PROC NLMIXED */
/* Poisson-Normal Model with Count Data */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: */
/* PROCS: NLMIXED */
/* DATA: Gaver and O'Muircheartaigh (1987) */
/* */
/* SUPPORT: Oliver Schabenberger */
/* REF: */
/* MISC: */
/****************************************************************/
data pump;
input y t group;
pump = _n_;
logtstd = log(t) - 2.4564900;
datalines;
5 94.320 1
1 15.720 2
5 62.880 1
14 125.760 1
3 5.240 2
19 31.440 1
1 1.048 2
1 1.048 2
4 2.096 2
22 10.480 2
;
proc nlmixed data=pump;
parms logsig 0 beta1 1 beta2 1 alpha1 1 alpha2 1;
if (group = 1) then eta = alpha1 + beta1*logtstd + e;
else eta = alpha2 + beta2*logtstd + e;
lambda = exp(eta);
model y ~ poisson(lambda);
random e ~ normal(0,exp(2*logsig)) subject=pump;
estimate 'alpha1-alpha2' alpha1-alpha2;
estimate 'beta1-beta2' beta1-beta2;
run;