Docsity

Unconditional Variance Formulas in Burnham and Anderson: Comparison and Application - Prof, Study notes of Earth Sciences

Toggle sidebar
bg1
Natural Resources Data Analysis – Lecture Notes
Brian R. Mitchell
V. Week 5:
A. Multivariate AIC
1. For multivariate techniques such as MANOVA or discriminant analysis, there
is no single error sum of squares, and there is generally no likelihood listed in
statistical output. So how do you calculate AIC?
2. Get the pooled error SSCP matrix (this is sometimes called "within groups")
from your stats package. Divide this matrix by n (sample size) to get the
multivariate equivalent of the maximum likelihood estimate of σ2 ("divide by n"
means you should divide each matrix element). Then use a software package that
can calculate the determinant of a matrix (the Excel formula MDETERM and
Mathematica can both do this). The determinant of the matrix is the value you
would plug in as σ2 in the model selection spreadsheet we've been using in class
(on the OLS page).
3. K in this situation includes each unique element in the matrix (i.e. the diagonal
and the elements above OR below the diagonal. So K for a 5x5 matrix (i.e. 4
predictor variables and an intercept) is 5 for the betas (predictor and intercept
estimates) + 5 for the sums of squares (matrix diagonal) + 10 for the cross-
products (off-diagonal) = 20. For a p x p matrix, the contribution of the matrix
elements is p(p +1)/2.
4. It turns out the B&A discusses multivariate AIC on pp. 424-426. David
Anderson clarified K in a personal communication.
B. Discuss any analysis issues that have come up on individual projects
C. Model Averaging: Parameter Variance Revisited
1. There are 2 formulas for unconditional variance floating around.
a) The formula presented in Burnham and Anderson (2002):
()
2
1
2
ˆ
ˆ
|
ˆ
ra
ˆ
v
ˆ
ra
ˆ
v⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡⎟
⎠
⎞
⎜
⎝
⎛−+=
⎟
⎠
⎞
⎜
⎝
⎛∑=
R
iiiiii gw
θθθθ
b) And the formula presented in Burnham and Anderson (2004)… as well
as page 345 of Burnham and Anderson (2002):
(
)
∑=⎥
⎦
⎤
⎢
⎣
⎡⎟
⎠
⎞
⎜
⎝
⎛−+=
⎟
⎠
⎞
⎜
⎝
⎛R
iiiiii gw
1
2
ˆ
ˆ
|
ˆ
ra
ˆ
v
ˆ
ra
ˆ
v
θθθθ
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Unconditional Variance Formulas in Burnham and Anderson: Comparison and Application - Prof and more Study notes Earth Sciences in PDF only on Docsity!

Natural Resources Data Analysis – Lecture Notes Brian R. Mitchell

V. Week 5:

A. Multivariate AIC

  1. For multivariate techniques such as MANOVA or discriminant analysis, there is no single error sum of squares, and there is generally no likelihood listed in statistical output. So how do you calculate AIC?
  2. Get the pooled error SSCP matrix (this is sometimes called "within groups") from your stats package. Divide this matrix by n (sample size) to get the multivariate equivalent of the maximum likelihood estimate of σ^2 ("divide by n" means you should divide each matrix element). Then use a software package that can calculate the determinant of a matrix (the Excel formula MDETERM and Mathematica can both do this). The determinant of the matrix is the value you would plug in as σ^2 in the model selection spreadsheet we've been using in class (on the OLS page).
  3. K in this situation includes each unique element in the matrix (i.e. the diagonal and the elements above OR below the diagonal. So K for a 5x5 matrix (i.e. 4 predictor variables and an intercept) is 5 for the betas (predictor and intercept estimates) + 5 for the sums of squares (matrix diagonal) + 10 for the cross- products (off-diagonal) = 20. For a p x p matrix, the contribution of the matrix elements is p(p +1)/2.
  4. It turns out the B&A discusses multivariate AIC on pp. 424-426. David Anderson clarified K in a personal communication.

B. Discuss any analysis issues that have come up on individual projects

C. Model Averaging: Parameter Variance Revisited

  1. There are 2 formulas for unconditional variance floating around.

a) The formula presented in Burnham and Anderson (2002):

2

1

2 vaˆr ˆ vaˆr ˆ| ˆ ˆ ⎥

⎟= +⎛^ −

R

θ i wi θ i gi θ i θ i

b) And the formula presented in Burnham and Anderson (2004)… as well as page 345 of Burnham and Anderson (2002):

∑ = (^ ) ⎥

⎟= +⎛^ −
⎛ R

i 1 wi^ i gi i i

2

vaˆrθˆ vaˆrθˆ| θˆ θˆ

c) The original formula uses the square root of the variance, and then squares the overall sum.

d) In pages 344-345 of Burnham and Anderson (2002), they say that: (1) The first formula assumes a perfect correlation of estimates of θ from different models. (2) The first formula introduces inconsistencies because the weights are nonlinear (i.e. the weights are squared in the first formula, and not in the second). (3) The second formula is used in a Bayesian context when the model-averaged posterior is a mixture distribution, and can also be derived in the Kullback-Liebler framework. (4) The first formula produces a model-averaged variance that is less than or equal to the second.

e) Another important difference between the formulas is that there is no rigorously derived covariance formula associated with the first formula, while there is for the second (it is presented in Burnham and Anderson (2004) and below in the section on model averaging an outcome).

  1. How big is the difference between the two formulas?

a) Based on a quick look at some sample data, the difference is generally quite small (i.e. the change is in the third decimal place of the variance) if the parameter being averaged is in all models. The difference can be quite large (up to an order of magnitude difference in just one set of sample data!) if the parameter is not in all models; this is the situation where the assumption of a perfect correlation in estimates of θ across the model set is grossly violated.

b) My personal opinion is that the second formula is more defensible, and should be used instead of the first formula. However, the first formula is in wider use (and seems to still be emphasized in Anderson’s workshops), so be sure to cite your use of this formula appropriately.

D. Model Averaging:θ θ

ˆ versus

1. The material in B&A (2002) is very confusing regarding θˆ^ and θ

. The difference between these two estimators hinges on what to do when a parameter is not in the model.

2. Burnham and Anderson initially assert that θˆ^ and its variance are calculated

by only using models where the parameter occurs.

(2) Calculating model averaged outcome variances can be a headache.

  1. Estimating the outcome

a) When the model set is nested (1) Write out your global model equation (2) Substitute your model averaged beta estimates and your x values (3) Add them up! (4) Example: (a) Given the regression equation: y = b 0 + b 1 x 1 + b 2 x 2 + b 3 x 3 (b) Given the model averaged estimates: b 0 = 1.45, b 1 = 0.43, b 2 = 2.33, and b 3 = -0.68. (c) For x 1 = 1, x 2 = 0, and x 3 = 3.4, (d) y = 1.45 + 0.431 + 2.330 – 0.68*3.4 = -0.

b) When the model set is not nested (1) For each model, write out the model equation, substitute in the model-specific beta values and your chosen x values, and calculate your model-specific point estimate. (2) Once you have a point estimate of the outcome for each model, apply the formula for a model averaged parameter to calculate the model averaged outcome estimate:

R y (^) i 1 wi y ˆ i

(3) Note that this method will also work for a nested set.

c) Let’s program these calculations on a spreadsheet. (1) For nested models: 1) copy model averaged estimates to a new sheet, 2) enter values for x, 3) use SUMPRODUCT to calculate the outcome. (2) For non-nested models: 1) copy model estimates to a new sheet, 2) copy weights to the new sheet, 3) enter values for x, 4) use SUMPRODUCT for each model to generate a model estimate, and then use SUMPRODUCT with those estimates and the model weights to get the model-averaged estimate.

  1. Estimating the model averaged variance of the outcome

a) How do you calculate the variance of an outcome? (1) This is a deceptively simple question. What you are actually trying to do is considered “ error propagation ”; you are summing a series of terms, each of which has a certain amount of uncertainty.

(2) The usual approach to dealing with this problem is the “ Method of Moments ”, which can get pretty messy and includes lots of partial derivatives. (3) Luckily, the problem is simplified in our case, since we are dealing with a linear equation, albeit one with correlated variables. The formula (from Hosmer and Lemeshow 2000, p. 41) to use in this situation is:

ˆ (^) (ˆ) vaˆr(ˆ ) 2 coˆv(ˆ,ˆ ) 0 0 1

2 j k

p

j

p

k j

j j k

p

j

Var y ∑ xj β ∑ ∑ xx β β

= = =+

(4) What do we need to know in order to use this formula? [x values, variances, and covariances] (5) Let’s program this formula on a spreadsheet: 1) Decide on x- values, 2) bring in variances and use SUMPRODUCT to multiply them with the squared x terms, 3) put x-values above and to the left of the matrix, 4) calculate a new matrix with the covariance term; clever use of relative vs. absolute formulas can speed this step up,

  1. sum the formulas in the new matrix, 6) add with the SUMPRODUCT of the variances and the squared x values.

b) Method 1 : Model averaged outcome variance based on individual model outcomes

(1) For each model, determine the point estimate and variance of the outcome, using the error propagation formula and the same set of x values for each model. (2) Use the formulas for averaging predictor estimates and variances:

R y (^) i 1 wi y ˆ i

( ) = ∑ = [ ( ) +( − )]

R y (^) i 1 wi yi gi yi yi

ˆ^2

vaˆr ˆ vaˆr ˆ | ˆ

c) Method 2 : Model averaged outcome variance based on model averaged predictor variances and covariances

(1) Calculate the predictor variable model averaged variances using the usual formula:

∑ = (^ ) ⎥

⎟= +⎛^ −
⎛ R

i 1 wi^ i gi i i

2

vaˆrθˆ vaˆrθˆ| θˆ θˆ

(2) Calculate the covariance for each combination of predictor variables using the formula:

∑ = (^ )^ (^ )⎥

⎟= +⎛^ −
⎛ R

i 1 wi^ i i gi i i

coˆvθˆ,τˆ coˆvθˆ,τˆ| θˆ θˆ τˆ τˆ

(3) Then use the formula for calculating the variance of an outcome (note that θ and τ are replaced by θj and θk):

= = =+

j k

p

j

p

k j

j j k

p

j

y xj θ x x θ θ

va ˆr ˆ vaˆr ˆ 2 coˆv ˆ,ˆ 0 0 1

2

d) They reduce their model set by 4 models (from 15 to 11, NOT 16 to 12 as they mistakenly write) because of colinearity between variable 2 and 4. This is a useful example of when you may be forced to alter the model set during an early stage of your analysis; Burnham and Anderson do not feel that this hurts a claim to a confirmatory analysis, and I agree.

e) They improperly apply their procedure for estimating parameter importance by using it on an unbalanced model set. In the original (full) model set, each parameter was represented in 8 models. In the reduced set, variables 1 and 3 were in 6 models, and 2 and 4 were in only 4. It was simply not valid to use their variable importance approach here.

  1. Durban Storm Data

a) As usual, I’m not convinced by the sample size used here. They suggest that sample size is 2,474 (once each week for 47-48 years). However, since the data are subsequently collapsed into counts by week, I think the sample size is 52 (essentially, the data for each week estimates the likelihood of rain in that week; we have the advantage of a good estimate of that probability, but we don’t get to inflate the sample size). They seem to be using the correct sample size in table 4.4 for degrees of freedom, but they should clearly have used QAICc instead of QAIC in this case.

b) The discussion of calculating the confidence interval of the probability of a storm for a given week is a little unclear. Essentially, they are calculating a model averaged outcome based on individual model estimates of the outcome and variance. This procedure is complicated by the logistic model; the safest strategy is to calculate your estimates and confidence intervals in logit space, then transform the end points into probabilities. By doing this for each week, they were able to generate the data for figure 4.2.

  1. Flour Beetle^ Mortality

a) Between 49 and 63 beetles tested at 8 different dosage levels, 471 beetles total. The models work with the probability of mortality at each dosage level. Is the sample size of 471 that Burnham and Anderson use really appropriate? My feeling is that the correct sample size is 8 (we get a good estimate of the mortality rate at each dosage level by using lots of beetles; but the number of individuals used to get that estimate is not relevant to the question at hand). I think that they should have used AICc for model selection.

b) Dosages ranged from 49 to 77 mg/L. How reasonable is it to use any model to estimate the effect of a 40 mg/L dose? In this type of problem

we can expect the mortality to be lower than at the 49 mg/L dose… but I don’t think this sort of extrapolation is good science.

c) I find it interesting that they use different link functions for models in their model set. My impression was that this violates the mandate against transforming outcome values… but on further reflection and digging, I discovered that link functions are apparently applied to the predictors in statistical software (e.g. the program MARK help on link functions shows the functions applied to the predictors). So apparently it is OK to compare models that use different link functions (e.g. probit, logit, etc.). It is still not OK to blatantly transform an outcome variable (e.g. y in some models and log(y) in others).

H. Writing about and presenting model selection results

Burnham and Anderson (2002) and Anderson et al. (2001) make numerous suggestions of things to include in papers that use model selection:

  1. State your objectives and note whether your analysis is confirmatory or exploratory ( Introduction )

a) If your analysis is confirmatory, make sure the details in your Methods section back this up.

  1. Describe and justify the working hypotheses and the model set , and how the models relate to the study objectives ( Methods ).

a) For large model sets, I recommend moving much of the model set description to an appendix. While it is OK to fully enumerate a large model set in a thesis or dissertation, I doubt that many journals will want to see this.

b) It may be simpler to describe your model set based on groups of parameters (e.g. the model set used four functional forms for time and four for season, in all possible combinations, to produce 16 models).

  1. Justify your choice of AIC and other formulas with specific references ( Methods )

a) You will need to cite your choice of AIC formula, model averaging formulas (i.e. parameter estimate, variance estimate, covariance estimate).

  1. Document your methods and use citations whenever possible, especially when they differ from the “typical” approach ( Methods ).

a) For example, the appropriate reference for the use of zeroes in the point estimate and variance formulas when a parameter is not in the model is the monograph Burnham and Anderson (2004); in Burnham and

  1. In many situations the terms “ independent ” and “ dependent ” do not make sense when applied to variables; x variables are often correlated! It is clearer to use the terms “predictor” or “explanatory” and “outcome” to refer to x and y variables, respectively.
  2. “Avoid confusing low frequencies with small sample sizes. If one finds only 4 birds on 230 plots, the proportion of plots with birds can be precisely estimated. Alternatively, if the birds are the object of study, the 230 plots are irrelevant, and the sample size (4) is very small” – Anderson et al. (2001), p. 377.

a) I couldn’t agree more with this statement! I just wish it were applied more carefully in the examples that Burnham and Anderson (2002) use.