Any help please?
I am after a stata code to help plot the observed and predicted count of data following comparison with Poisson and negative binomial.
After some search, I found this stata user written command -prcounts- . However, it does generate the predicted estimates but does not plot the graph. I am not sure if my Stata/IC 15 is supported as it seems the code was written since the year 2000 http://www.indiana.edu/~jslsoc/files...TBprcounts.pdf .
Sample of my code is:
I get the following message if I try to graph:
All I want is a graph like the one attached:
Thanks
I am after a stata code to help plot the observed and predicted count of data following comparison with Poisson and negative binomial.
After some search, I found this stata user written command -prcounts- . However, it does generate the predicted estimates but does not plot the graph. I am not sure if my Stata/IC 15 is supported as it seems the code was written since the year 2000 http://www.indiana.edu/~jslsoc/files...TBprcounts.pdf .
Sample of my code is:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int pre float(counts disease) 3 1 2 3 2 2 3 3 2 3 4 2 11 1 2 3 1 2 3 2 4 11 1 2 11 2 4 32 1 2 3 1 2 3 2 2 0 0 2 3 1 2 3 1 2 3 2 2 3 3 2 3 1 2 3 2 2 0 0 2 3 1 2 3 2 2 3 3 2 3 1 2 3 2 4 3 3 2 3 1 2 0 0 1 3 1 2 7 1 2 3 1 2 3 2 2 3 1 2 3 2 2 3 3 2 11 1 2 11 2 2 0 0 2 1 1 2 3 1 4 3 2 2 3 3 2 3 4 2 3 5 2 3 6 1 3 7 2 3 8 2 3 9 2 3 10 2 3 11 1 3 12 2 3 13 2 3 14 2 3 15 2 3 16 2 3 17 1 5 1 2 11 1 2 11 2 4 11 3 4 11 4 2 18 1 2 32 1 2 0 0 1 3 1 2 3 2 2 3 3 2 3 4 2 3 5 2 3 6 2 3 7 2 3 8 2 11 1 2 0 0 1 3 1 2 3 2 2 3 3 2 3 4 2 3 5 2 3 6 2 3 7 2 3 8 2 3 9 2 3 10 2 3 11 2 3 12 2 3 13 2 11 1 4 11 2 4 11 3 2 3 1 2 3 2 2 3 3 2 3 4 2 3 5 2 3 6 2 11 1 2 2 1 2 2 2 2 3 1 2 end
Code:
poisson counts i.disease prcounts pois, max(16) plot nbreg counts i.disease prcounts nbreg, max(16) plot
Code:
graph poisrate poisval nbregrate nbregval ziprate
Code:
poisrategraph_g.new poisval nbregrate nbregval ziprate: class member function not found r(4023);
Thanks
Comment