Do something like this and change the Component value in the Where Statement to get another Component model 🙂
proc fmm data=acu plots=density (bins=15);
model frequency= /dist=poisson k=3
parms(2.1, 2.8, 3.2); *\starting values for mean ln(8), ln(16) en ln(24);
probmodel / parms (0, 0);
freq age;
title 'poisson with 3 support points';
ods output ParameterEstimates=pePoisson;
run;
data _null_;
set pePoisson;
where Component=1;
call symputx('lambdaFMM', Estimate);
run;
%put &lambdaFMM.;
data PMF_fmm;
do t= 0 to 13;
Y = pdf("Poisson", t, &lambdaFMM.);
output;
end;
run;
data Discrete_fmm;
merge FreqOut PMF_fmm;
Prop = Percent / 100;
run;
proc sgplot data=Discrete_fmm;
vbarparm category=N response=Prop /legendlabel = 'Sample';
series x=T y=Y / markers legendlabel= 'PMF'
markerattrs=GraphDataDefault(symbol=CIRCLEFILLED size=10);
title "Emails per 30minute Poissondist";
run;
... View more