search for: nbvcovm

Displaying 1 result from an estimated 1 matches for "nbvcovm".

2007 Nov 06
0
Discrepancy of Neg. Binomial Estimation in R
...2_e)-(phi_e/( sig2_e-1))*log(sig2_e)) } # Ng. Binomial regression b = solve(t(x)%*%x,(t(x)%*%y)) b = matrix(c(b,var(y)/mean(y)),nrow=3) # set initial value for means and variance nb.res = optim(b,like.nb, y=y, x=x, method="BFGS", control=list(fnscale=-1), hessian=T) nbcoef=nb.res$par nbvcovm=solve(-nb.res$hessian) # Alternative glm function library(MASS) summary(glm.nb(y~z)) ****************************************************************************** Thanks a lot in advance for your help. Best, Xiaobo