Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Question regarding linktest and its implementation

From   Phil Schumm <>
Subject   Re: st: Question regarding linktest and its implementation
Date   Tue, 8 Aug 2006 09:28:45 -0500

On Aug 7, 2006, at 1:46 PM, Daniel Schneider wrote:
I know the Stata manual, the Pregibon paper and Tukey's paper. Nonetheless, they did not clarify the issue sufficiently for me. So what you are saying is that the linear predictor (i.e. -predict, xb-) should be predictive of the observed dependent variable? I believe I understand the concept, but I assumed that "the effects of the covariates" should be expressed on the same scale as the dependent variable not in the scale of the link-function- transformation.

I'm afraid I don't really understand the question, so I must apologize in advance if my response is not what you are looking for. Suppose we have a GLM with link function g():

g(mu) = xb

where mu is the mean of the response and xb is the linear predictor. Following Pregibon (1980), if we want to explore the adequacy of g(), we can embed it in a family indexed by one or more parameters; for example, let's take the one-parameter power function available with the -link()- option in -glm-:

g(mu; lambda) = mu^lambda for lambda!=0

= log(mu) for lambda==0

Now, given a value of lambda (call it lambda_0), we can expand g() around that value to get

g(mu; lambda) ~ g(mu; lambda_0) + (lambda - lambda_0) * g'(mu; lambda_0)

= mu^lambda_0 + (lambda - lambda_0) * (mu^lambda_0 * log(mu))

Rewriting in terms of g(mu; lambda_0) yields the following approximation

g(mu; lambda_0) ~ mu^lambda - (lambda - lambda_0) * (mu^lambda_0 * log(mu))

= xb - (lambda - lambda_0) * (mu^lambda_0 * log (mu)) (1)

McCullagh and Nelder (1989; pp. 375-9) provide a nice discussion of this, and also of the 2-parameter case. The important point here is that it leads us to fit the model initially using the link function g (mu; lambda_0), to obtain an estimate of mu (call it mu_hat), and then to add

- (mu_hat^lambda_0 * log(mu_hat))

to the linear predictor, using the significance of the resulting coefficient as an indicator of the inadequacy of lambda_0.

Consider the case of the linear model (i.e., with identity link). In this case, lambda_0 equals one, and thus the term we are adding becomes

- (mu_hat * log(mu_hat)) (2)

Note that since in the linear case mu_hat = xb_hat, (2) is quite close to the (xb_hat)^2 term added by -linktest-, thereby providing one way to think about what -linktest- is doing, and showing why both approaches are likely to give a similar assessment of the adequacy of the identity link. The advantage of (2) is that the coefficient of the added term provides a direct estimate of the first-order adjustment to lambda_0, which is helpful if we find lambda_0 to be inadequate.

Finally (and I hope this will begin to address your question), let's consider your original case of the reciprocal link. In this case lambda_0 equals -1, and following equation (1) we would fit the augmented model

g(mu; -1) = xb - gamma * (mu_hat^(-1) * log(mu_hat))

= xb + gamma * (xb_hat * log(xb_hat)) (3)

where b_hat is our estimate of b from the initial fit, and gamma = (lambda + 1). Once again, the second term in (3) above is not exactly the same as the (xb_hat)^2 used by -linktest-, but it is close. More importantly, however, this should make it clear why - linktest- uses xb_hat and (xb_hat)^2 (rather than (xb_hat)^(-1) and (xb_hat)^(-2)) when conducting the test.

I hope this is helpful.

-- Phil

McCullagh, P and Nelder, JA (1989). Generalized Linear Models, 2nd edition. Chapman and Hall.
Pregibon, D (1980). Goodness of link tests for generalized linear models. Applied Statistics 29:15-24.

* For searches and help try:

© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index