/* Create theoretical Poisson Data */ data TheoreticalPoisson; mincount = 0; maxcount = 30; do count= minCount to maxCount; p1=pdf('Poisson', count, 0.5); p2=pdf('Poisson', count, 1); p3=pdf('Poisson', count, 5); p4=pdf('Poisson', count, 10); output; end; run; title 'Theoretical Poisson distributions'; proc sgplot data=TheoreticalPoisson noautolegend; ****vbarparm category=count response=freq / legendlabel='Count Data'; series x=count y=p1 / markers markerattrs=(symbol=circlefilled color=red) lineattrs=(color=red)legendlabel='Fitted Poisson Lambda=0.5 '; series x=count y=p2 / markers markerattrs=(symbol=squarefilled color=yellow) lineattrs=(color=yellow)legendlabel='Fitted Poisson Lambda=1'; series x=count y=p3 / markers markerattrs=(symbol=squarefilled color=green) lineattrs=(color=green)legendlabel='Fitted Poisson Lambda=5'; series x=count y=p4 / markers markerattrs=(symbol=squarefilled color=blue) lineattrs=(color=blue)legendlabel='Fitted Poisson Lambda=10'; ***xaxis display=(nolabel);xaxis label = 'NUMBER OF EGGS COUNTED' fitpolicy=THIN; ***yaxis display=(nolabel);yaxis label = 'PROBABILITY MASS FUNCTION'; keylegend / location=inside position=NE across=1; run; title;