alexander russell
2009-Oct-15 04:25 UTC
[R] When modeling with negbin from the aod package...
Hi, When modeling with negbin from the aod package, parameters for a given count y | lambda~Poisson(lambda) with lambda following a Gamma distribution Gamma(r, theta) are estimated. The intercept is called phi. Some other parameters may be also be estimated from factors in the data: the estimates returned for all these would be in accordance with the Value listing in the negbin entry in the aod reference pdf, that is, they are objects "of formal class "glimML"", that is they are maximum likelihood estimates. Would someone tell me if I'm correct? regards, shfets
alexander russell <ssv736 <at> gmail.com> writes:> > Hi, > When modeling with negbin from the aod package, parameters for a given count > > y | lambda~Poisson(lambda) > > with lambda following a Gamma distribution Gamma(r, theta) > > are estimated. > The intercept is called phi. > Some other parameters may be also be estimated from factors in the > data: the estimates returned for all these would be in accordance with > the Value listing in the negbin entry in the aod reference pdf, that > is, they are objects "of formal class "glimML"", that is they are > maximum likelihood estimates. Would someone tell me if I'm correct? > regards, > shfetsSounds about right, except that I'm not sure what you mean by "the intercept is called phi" -- phi is an overdispersion parameter (var(y) = mu+phi*mu^2, so the distribution approaches Poisson as phi -> 0 ) You can look at help("glim-ML"), or at the innards of the negbin function (just type negbin at the R prompt) for more information ...
alexander russell
2009-Oct-21 06:08 UTC
[R] Fwd: When modeling with negbin from the aod package...
---------- Forwarded message ---------- From: alexander russell <ssv736@gmail.com> Date: Tue, Oct 20, 2009 at 4:34 PM Subject: Re: [R] When modeling with negbin from the aod package... To: Matthieu Lesnoff <matthieu.lesnoff@gmail.com> Hello again, It seems that, though we have a simple estimate of the variance, phi, with negbin, some models seek to create a formula for the variance. For example, I think Bolker has modeled variance in the Lily_sum data set as *nlikfun = function(a, c, d) {* *+ k = c * exp(d * flowers)* *+ -sum(dnbinom(seedlings, mu = a, size = k, log = TRUE))* *+ }* (book, p. 420) if I'm correct? Is it fair to say that the 'random' argument for negbin will model variance this way only if the independent variable on which the variance depends in the "right-hand formula" is categorical or is a factor with a few levels only? regards, s On Thu, Oct 15, 2009 at 5:53 PM, Matthieu Lesnoff < matthieu.lesnoff@gmail.com> wrote:> >that is they are > > maximum likelihood estimates. Would someone tell me if I'm correct? > > yes, all parameters estimated with negbin (aod) are ML estimates > > Regards > > Matthieu > >[[alternative HTML version deleted]]