Second Getting Started Example for PROC HPFMM
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: hpfmmgs2 */
/* TITLE: Second Getting Started Example for PROC HPFMM */
/* Zero-inflated Poisson regression */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: Excess zeros */
/* Count data */
/* Bayesian analysis */
/* PROCS: HPFMM */
/* DATA: */
/* */
/* SUPPORT: Dave Kessler */
/* REF: */
/* MISC: */
/****************************************************************/
data catch;
input gender $ age count @@;
datalines;
F 54 18 M 37 0 F 48 12 M 27 0
M 55 0 M 32 0 F 49 12 F 45 11
M 39 0 F 34 1 F 50 0 M 52 4
M 33 0 M 32 0 F 23 1 F 17 0
F 44 5 M 44 0 F 26 0 F 30 0
F 38 0 F 38 0 F 52 18 M 23 1
F 23 0 M 32 0 F 33 3 M 26 0
F 46 8 M 45 5 M 51 10 F 48 5
F 31 2 F 25 1 M 22 0 M 41 0
M 19 0 M 23 0 M 31 1 M 17 0
F 21 0 F 44 7 M 28 0 M 47 3
M 23 0 F 29 3 F 24 0 M 34 1
F 19 0 F 35 2 M 39 0 M 43 6
;
proc hpfmm data=catch;
class gender;
model count = gender*age / dist=Poisson;
run;
proc hpfmm data=catch;
class gender;
model count = gender*age / dist=Poisson ;
model + / dist=Constant;
run;
proc hpfmm data=catch seed=12345;
class gender;
model count = gender*age / dist=Poisson;
model + / dist=constant;
performance nthreads=2;
bayes;
run;
ods graphics on;
ods select TADPanel;
proc hpfmm data=catch seed=12345;
class gender;
model count = gender*age / dist=Poisson;
model + / dist=constant;
performance nthreads=2;
bayes;
run;
ods graphics off;