Dear R users, I have been using the zicounts package (verson 1.1.4) in R (version 2.4.1). I have been fitting zero inflated Poisson regressions to model the number of trips made by a household. Whilst I can get the best fit parameter set from zicounts, I can't get the package to return the fitted values for the model. I have attempted to calculate the fitted values from the optimal parameter set, but I'm not confident I got this correct. Can zicounts return fitted values for a ZIP model? If not, what cumulative distribution should be used for the zero inflated (ie z) coefficients? Will a cumulative standard normal distribution do the job? Many thanks in advance! Nic Surawski Statistician & Data Manager .................................................................... Veitch Lister Consulting Pty Ltd. Ground Floor, 80 Jephson St, PO Box 1054, Toowong, QLD 4066 AUSTRALIA Ph: +61 7 3870 4888 Fax: +61 7 3870 4446 Email: nic.surawski@veitchlister.com.au <http://www.veitchlister.com.au/> Web: www.veitchlister.com.au <http://www.veitchlister.com.au/> .................................................................... Conditions Only an individual or entity who is intended to be a recipient of this e-mail may access or use the information contained in this e-mail or any of its attachments. Opinions contained in this e-mail or any of its attachments do not necessarily reflect the opinions of Veitch Lister Consulting P/L. The contents of this e-mail and any attachments are confidential and may be legally privileged and the subject of copyright. If you have received this e-mail in error, please notify Veitch Lister Consulting immediately and erase all copies of the e-mail and the attachments. Veitch Lister Consulting uses virus scanning software. However, it is not liable for viruses present in this e-mail or in any attachment. [[alternative HTML version deleted]]
On Thu, 25 Oct 2007, Nic Surawski wrote:> Dear R users, > > I have been using the zicounts package (verson 1.1.4) in R (version > 2.4.1). I have been fitting zero inflated Poisson regressions to model > the number of trips made by a household. Whilst I can get the best fit > parameter set from zicounts, I can't get the package to return the > fitted values for the model. I have attempted to calculate the fitted > values from the optimal parameter set, but I'm not confident I got this > correct. > > Can zicounts return fitted values for a ZIP model?Not AFAICS. It seems to have neither a predict() nor a fitted() function and the fitted values do not seem to be contained in the object either. Instead of using zicounts(), you can also zeroinfl() from the "pscl" package which has both, predicted() and fitted() methods. See also vignette("countreg", package = "pscl")> If not, what > cumulative distribution should be used for the zero inflated (ie z) > coefficients? Will a cumulative standard normal distribution do the > job?I'm not sure what you mean here, but I guess the answer is no. Check some of the standard references for this, the vignette mentioned above gives some information and severel references. Z