RE : [R] Dispersion parameter in Neg Bin GLM

Lesnoff, Matthieu (ILRI) m.lesnoff at cgiar.org
Thu Jun 30 08:51:55 CEST 2005


Edward, you also can use the package aod on CRAN, see the help page of the function negbin.
 
Best
 
Matthieu
 
An example:
 
> library(aod)
> data(dja)
> negbin(y ~ group + offset(log(trisk)), ~group, dja, fixpar = list(4, 0))

Negative-binomial model
-----------------------
negbin(formula = y ~ group + offset(log(trisk)), random = ~group, 
    data = dja, fixpar = list(4, 0))
Convergence was obtained after 113 iterations.
Fixed-effect coefficients:
            Estimate Std. Error z value Pr(> |z|)
(Intercept)  -0.5526     0.2277 -2.4267    0.0152
groupTREAT   -1.0205     0.2598 -3.9287    < 1e-4
Overdispersion coefficients:
              Estimate Std. Error z value Pr(> z)
phi.groupCTRL   0.8287      0.412  2.0117  0.0221
Overdispersion coefficients set to fixed values:
               Value
phi.groupTREAT     0
Log-likelihood = -121.149; nbpar = 3; df.residual = 72; Deviance = 111.826; AIC = 248.297

 
 
 

________________________________

De: r-help-bounces at stat.math.ethz.ch de la part de Edward McNeil
Date: jeu. 6/30/2005 8:50
À: r-help at r-project.org
Objet : [R] Dispersion parameter in Neg Bin GLM



Hi,
Can someone tell me if it is possible to set the dispersion parameter constant when fitting a negative binomial glm in R? I've looked at the documentation and can't find the appropriate argument to pass.
In STATA I can type: nbreg depvar [indepvar...], offset(offset) dispersion(constant).
Thank you

        [[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list