Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: prcounts to test poisson predictive ability?


From   Leslie Witter <[email protected]>
To   [email protected]
Subject   st: prcounts to test poisson predictive ability?
Date   Sat, 25 Oct 2008 14:27:36 -0700 (PDT)

Hi!  I'm developing a poisson model to predict counts of mosquitoes caught in insect traps.  After running the model I used prcounts to look at the predictive ability using the training data:

prcounts mcnt, max(99) plot
summarize mcnt*
graph twoway line mcntpreq mcntobeq mcntval
generate devmcnt = mcntobeq-mcntpreq
summarize devmcnt
graph twoway line devmcnt mcntval

This worked ok.  Saved that data set and am now bringing in data that was withheld when I built the original model.  When I try to use prcounts on the new data set 'prcounts mwct, max(99) plot', I get te error "obs. nos. out of range".  When I try to proceed, I see that the values for mwctobeq, mwctpreq, mwctoble, and mwctprle are all equal to zero!  How can I resolve this problem and proceed with using prcounts to test how well the model works with the withheld data?  Also, is there any way to use prcounts (or another post-estimation command for poisson models) with counts>99?  I have counts from 0 to 1,000+.

By the way, I'm using poisson rather than nbrm because am planning on adding random intercepts to this model and testing with gllamm.  nbrm is a slightly better fit for my data than prm (zip and zinb are not), but I haven't been able to find a way to use nbrm in gllamm framework.  Any ideas?

Thanks so much!!!
Leslie



      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index