Dear R Users, When using zeroinfl() function to fit a Zero-Inflated Negative Binomial (ZINB) model to a dataset, the summary() gives an estimate of log(theta) and its standard error, z-value and Pr(>|z|) for the count component. Additionally, it also provided an estimate of Theta, which I believe is the exp(estimate of log(theta)). However, if I would like to have an standard error of Theta itself (not the SE.logtheta), how would I obtain or calculate that standard error? Thank you very much for your time. Best regards, Tzeng Yih Lam ------------------------------------------------------------------------------ PhD Candidate Department of Forest Engineering, Resources and Management College of Forestry Oregon State University 321 Richardson Hall Corvallis OR 97330 USA Phone: +1.541.713.7504 Fax: +1.541.713.7504 ------------------------------------------------------------------------------
On 15/02/2010, at 12:49 PM, Lam, Tzeng Yih wrote:> Dear R Users, > > When using zeroinfl() function to fit a Zero-Inflated Negative Binomial (ZINB) model to a dataset, the summary() gives an estimate of log(theta) and its standard error, z-value and Pr(>|z|) for the count component. Additionally, it also provided an estimate of Theta, which I believe is the exp(estimate of log(theta)). > > However, if I would like to have an standard error of Theta itself (not the SE.logtheta), how would I obtain or calculate that standard error?It's tricky. The exp and log functions aren't linear!!! So nothing really works very well. To start with, if you have an unbiased estimate of log(theta), say lt.hat, then exp(lt.hat) is NOT an unbiased estimate of theta. If you are willing to assume that lt.hat is normally distributed then the expected value of exp(lt.hat) is theta*exp(sigma^2/2) where sigma^2 is the variance of lt.hat. The variance of exp(lt.hat) is (*) theta^2 * exp(sigma^2) * (exp(sigma^2) - 1). You can ``plug in'' the SE of lt.hat for sigma into the foregoing and get an ***``approximately''*** unbiased estimate of theta: theta.hat = exp(lt.hat - SE^2/2) and then an approximate estimate of the variance of this ``theta.hat'' (by plugging in theta.hat for theta and SE for sigma in (*)). The results won't be correct, but they'll probably be in the right ball park. I think! This is all posited on the distribution of the estimate of log(theta) being normal (or ``Gaussian''). Whether this is a justifiable assumption in your setting is questionable. Some simulation experiments might be illuminating. cheers, Rolf Turner P. S. The formulae I gave about are the result of quickly scribbled calculations, and could be wrong. They should be checked. R. T. ###################################################################### Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author. This e-mail has been scanned and cleared by MailMarshal www.marshalsoftware.com ######################################################################
On Sun, 14 Feb 2010, Lam, Tzeng Yih wrote:> Dear R Users, > > When using zeroinfl() function to fit a Zero-Inflated Negative Binomial > (ZINB) model to a dataset, the summary() gives an estimate of log(theta) > and its standard error, z-value and Pr(>|z|) for the count component. > Additionally, it also provided an estimate of Theta, which I believe is > the exp(estimate of log(theta)).As maximum likelihood estimation is employed, this does not matter for point estimation. theta is the ML estimator for theta and log(theta) is the ML estimator for log(theta). I don't think that there is an unibiasedness result for either one, but both are consistent (if the model is correctly specified). What is done internally in zeroinfl() is that log(theta) is employed which is a standard approach for numeric optimization of positive parameters.> However, if I would like to have an standard error of Theta itself (not > the SE.logtheta), how would I obtain or calculate that standard error?You can do so by means of the delta method which is rather simple in this case: The standard error of theta is: theta * SE(logtheta). Thus, if obj is a fitted "zeroinfl" object: ## theta obj$theta ## associated standard error obj$theta * obj$SE.logtheta Whether this is very useful is another story, of course...see also Rolf's remarks. Z> Thank you very much for your time. > > Best regards, > Tzeng Yih Lam > > ------------------------------------------------------------------------------ > PhD Candidate > Department of Forest Engineering, Resources and Management > College of Forestry > Oregon State University > 321 Richardson Hall > Corvallis OR 97330 USA > Phone: +1.541.713.7504 > Fax: +1.541.713.7504 > ------------------------------------------------------------------------------ > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Possibly Parallel Threads
- Interpreting the results of the zero inflated negative binomial regression
- opposite estimates from zeroinfl() and hurdle()
- Convergence problem with zeroinfl() and hurdle() when interaction term added
- Poisson Regression: questions about tests of assumptions
- Negative Binomial Regression - glm.nb