Displaying 4 results from an estimated 4 matches for "fixpar".
2007 Jan 06
2
negative binomial family glm R and STATA
Dear Lister,
I am facing a strange problem fitting a GLM of the negative binomial
family. Actually, I tried to estimate theta (the scale parameter)
through glm.nb from MASS and could get convergence only relaxing the
convergence tolerance to 1e-3. With warning messages:
glm1<-glm.nb(nbcas~.,data=zonesdb4,control=glm.control(epsilon = 1e-3))
There were 25 warnings (use warnings() to see
2005 Jun 30
1
RE : Dispersion parameter in Neg Bin GLM
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|)
(Inte...
2007 Dec 12
1
Defining the "random" term in function "negbin" of AOD package
...andom" term, which is supposed to provide a right hand
formula for the overdispersion parameter. I'm not even sure what this
statement means. Any advice you have would be greatly appreciated.
negbin(formula, random, data, phi.ini = NULL, warnings = FALSE,
na.action = na.omit, fixpar = list(),
hessian = TRUE, control = list(maxit = 2000), ...)
My largest model using glm.nb looks like this:
negBin.glm1 <- glm.nb(Count ~ offset(log(Tow.Area)) + Basin + Bathy +
Hypoxia + Period + Depth + Basin*Depth + Bathy*Depth + Hypoxia*Depth +
Period*Depth +...
2008 Mar 19
1
betabinomial model
...al(2-y)))
d
betabinom<- optim(c(-1.2628,-0.0936,0.3485,0.6155,-.2918),b.bin, method =
"BFGS")
betabinom<-nlminb(start=c(-1.2628,-0.0936,0.3485,0.6155,-.2918),b.bin)
betabinom
beta.binomial<- betabin(cbind(y, n - y) ~ z1 +z2+z3, ~ 1, data
=cancer,fixpar=list(5,-.2918))
beta.binomial