7 Model inference

7.2 Transformations of coefficients

Here is a starter example that calls on the invariance of MLEs under transformation.

 
Exercise 7.54
For the birthweight example, suppose that of real interest is the effect on birthweight of a baby being born 3 weeks early compared to the usual 40 weeks. On average, how much lighter would you expect such a baby to be?

 

7.2.1 Monotonic transformations of one parameter

Definition 7.2.1.

In general, suppose we have the maximum likelihood estimate for some quantity β denoted as β^ and a confidence interval (βL, βU). The maximum likelihood estimate and corresponding confidence interval for some increasing monotonic function ϕ=h(β) is obtained by applying the transformation to both quantities: ϕ^=h(β^) and (ϕL,ϕU)=(h(βL),h(βU)). For a decreasing monotonic function, the limits of the confidence interval are reversed.

 
Exercise 7.55
Consider the AIDS data example, for which we modelled using a Poisson regression where the expected number of AIDS deaths in a given 3 month time period t is μ(t)=exp{a+bt}. Suppose we are interested in the average percentage increase in number of deaths from one time point to the next.

Find a confidence interval for this quantity.

 

7.2.2 Transformations of two or more parameters

Suppose that we have a parameter vector 𝜷. Let 𝜷^ denote the vector of maximum likelihood estimates with variance-covariance matrix V=var(𝜷^). We are interested in estimating some function of these coefficients, say γ=h(𝜷). By invariance, the MLE is γ^=h(𝜷^). Determination of the confidence interval for γ needs careful consideration as there is likely to be dependence between the coefficients.

Definition 7.2.2.

(Delta method) For some transformation h(𝜷), define the vector of partial derivatives of h with respect to the parameters 𝜷 as:

h𝜷=(hβ1,,hβp)T.

The transformation h(𝜷^) can be approximated by the first two terms of the Taylor series around some value 𝜷0:

h(𝜷^)h(𝜷0)+h𝜷=𝜷0T(𝜷^-𝜷0),

where the vector of derivatives are evaluated at 𝜷. The variance of the transformation 𝜷^ is then approximated by:

var(h(𝜷^)) var(h(𝜷0)+h𝜷=𝜷0T(𝜷^-𝜷0))
=var(h𝜷=𝜷0T𝜷^)
=h𝜷=𝜷0Tvar(𝜷^)h𝜷=𝜷0h𝜷=𝜷^Tvar(𝜷^)h𝜷=𝜷^

where var(𝜷^) is the variance-covariance matrix of the parameter vector 𝜷^.

It follows from the delta method that the standard error of the transform γ^=h(𝜷^) is:

std(γ^)=h𝜷=𝜷^Tvar(𝜷^)h𝜷=𝜷^,

and the corresponding (1-α)100% asymptotic confidence interval is:

(γ^-z1-α2×std(γ^),γ^+z1-α2×std(γ^)).

Note: Suppose that γ=t(ψ) where ψ=h(𝜷) is a linear combination of the model parameters β1,,βp, and that t(ψ) is a simple monotonic transformation of ψ. Then it is best to apply the above method to obtain a confidence interval for ψ and then translate this into a confidence interval for γ=t(ψ).

7.2.3 An example: analgesic data

The data set in analgesic comes from a clinical trial that compares four analgesics; Amidone, Morphine, Pethidine and Phenadoxone. Figure 7.1 (Link) presents a scatter plot of the proportion of patients who recorded pain relief against the log-dosage of the drug they received.

Figure 7.1: Link, Caption: Analgesic clinical trial data of proportion against log-dose. Lines represent the fitted logistic curves according to the main effects model (see text).

Model

Let Yi be the proportion with pain relief, mi the number of patients for each dose/drug combination, and xi the log dose. The obvious model is YiBinoprop(mi,μi) where μi is the (unknown) probability of pain relief.

Suppose that the logit of the probability μ changes linearly with log-dose, whatever the drug, but the drug affects the intercept. This defines the main effects model with numerical log-dose and categorical drug explanatory variable. Mathematically this model is

logit(𝝁)=β0+β1𝐱+β2𝐚Mo+β3𝐚Pe+β4𝐚Ph,

where 𝐚j are indicator vectors for drugs ‘Mo’rphine, ‘Pe’thidine and ‘Ph’enadoxone, and 𝐱 defines the log-dose. Note that the drug Amidone is taken as the baseline case and the co-efficients β2, β3 and β4 represent in intercept change in the linear predictor for each respective drug on top of the baseline case.

Fitting this model in R:

analgesic <- read.table("analgesic.dat")
mod1 <- glm(cbind(number, total-number) ~ 1 + ldose + drug,
  family=binomial(link = "logit"), data = analgesic)
summary(mod1)

This summary returns:

Deviance Residuals:
     Min        1Q    Median        3Q       Max
-0.78625  -0.50404   0.04222   0.46554   1.13291

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  -1.8933     0.2033  -9.312  < 2e-16 ***
ldose         4.0616     0.2973  13.663  < 2e-16 ***
drugMo       -0.3921     0.1801  -2.177   0.0295 *
drugPe       -2.3275     0.2333  -9.977  < 2e-16 ***
drugPh        1.8515     0.2294   8.071 6.96e-16 ***
---
Signif. codes:  0 *** 0.001 ** 0.01 * 0.05 . 0.1   1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 249.9579  on 13  degrees of freedom
Residual deviance:   4.2588  on  9  degrees of freedom
AIC: 79.48

 
Exercise 7.56
Write down the estimated fitted means and probabilities, for each of the drugs.

 

The fitted logistic curves for each drug is depicted in Figure 7.1 (Link). From the fitted curves, we see that:

  • There is a difference in relief: ordering Ph,Am,Mo,Pe.

  • The ‘shape’ of the fitted curves are the same, only shifted.

  • A unit increase in log-dose produces a common 4.06 logit rise in pain relief.

Compare the effects of drugs Phenadoxone and Morphine. For a given log-dosage x, the linear predictor for each drug are:

ηPh=β0+β1x+β4ηMo=β0+β1x+β2

The difference between these effects are:

γ=ηPh-ηMo=β4-β2.

 
Exercise 7.57
Provide an interpretation for the difference γ=β4-β2.

 

 
Exercise 7.58
Calculate the Phenadoxone to Morphine odds ratio and calculate the corresponding 95% confidence interval.

Note that var(𝜷) is:

vcov(mod1)

            (Intercept)   ldose  drugMo  drugPe  drugPh
(Intercept)      0.0413 -0.0454 -0.0175  0.0052 -0.0362
ldose           -0.0454  0.0884 -0.0011 -0.0453  0.0354
drugMo          -0.0175 -0.0011  0.0324  0.0186  0.0176
drugPe           0.0052 -0.0453  0.0186  0.0544 -0.0001
drugPh          -0.0362  0.0354  0.0176 -0.0001  0.0526