Hi Rick, Thanks very much for your reply. I'm hoping I can feel my way through this... The neqative binomial (NB) model should have a parameter, k, so I don't think your formula is correct. Typically, yes, I agree. However, when the REPEATED statement is used in GENMOD (invoking the GEE), ML estimates of the scale (or dispersion for NegBin) disappear, perhaps into the "nuisance" variation associated with the clustering? If k is required, however, I don't have any idea how to get ML estimates of it in IML? 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. Agree in Ui and Fui. I'll have to defer to you on the others, although the negative sign in the gamma confused me as well. 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)) Tried it, and understandably it's looking for a matrix "k". I'll run it by the other forum as well. 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. Alas, no. It's not specific to the NegBin, but occurs with other distributions (e.g., Poisson) as well. Thanks again, Adam
... View more