The neqative binomial (NB) model should have a parameter, k, so I don't think your formula is correct. Your first question is statistical, rather than having to do with matrices and linear algebra. I'm not an expert in GEEs or using generalized linear models, but I discussed this with a colleague. As best we can tell, the macro writer is using the following definitions for a model with link function g(): Ui: mean Fui: ginv(mean), i.e. linear predictor Fui_dev: diagonal matrix of weights for Fisher scoring = 1/(v(mu)*dg(mu)**2) (not sure about this one: gamma has negative sign?) Vui: diagonal matrix of inverse of square root of variance. If these are right, for a log-linked NB with dispersion parameter k, you might try Ui = xi*beta Fui = log(ui) Fui_dev = diag(ui/(1+k*ui)) Vui = diag( 1/sqrt(ui+k*ui##2)) As I've said, this is a guess. You might get better answers from the SAS Discussion Forum on SAS/STAT and Statistical Procedures. For your second question, I'm away from my office, so can't reproduce the error. Perhaps when you correct specify the NB model, this second error will go away. Or someone else might be able to help.
... View more