Appendix A: Sums of Variances and Covariances
Given the variance-covariance matrix of the parameters of a linear model (Equation 43), variance and covariances of sums
of those coefficients are calculable [17, 19].
(43) ?(𝛃) =
[
Var(β0) Cov(β0, β1) Cov(β0, β2) ⋯ Cov(β0, σε)
Cov(β0, β1) Var(β1) Cov(β1, β2) ⋯ Cov(β1, σε)
Cov(β2, β0) Cov(β2, β1) Var(β2) ⋯ Cov(β2, σε)
⋮ ⋮ ⋮ ⋱ ⋮
Cov(β0, σε) Cov(β1, σε) Cov(β2, σε) ⋯ Var(σε) ]
For any coefficients β0 through β𝑘, the variance of their sums is the sum of their variances plus the sum of each
covariance pair:
(44) Var(β0 +β1 +··· +β𝑘) =Var(β0) +
Cov(β0, β1) +··· +Cov(β0, β𝑘) +Cov(β1, β0) +
Var(β1) +··· +Cov(β1, β𝑘) +Cov(β𝑘, β0) +
Cov(β𝑘, β1) +··· +Var(β𝑘)
The off-diagonal covariance terms for ?(𝛃) can be calculated using the sum of the unique covariance pairs. For
example, consider the covariance between two variables ? and ? with scalar 𝑘:
(45) Var(? +𝑘?) =Var(?) +𝑘2Var(?) +
2𝑘Cov(?, ?)
Cov(?, 𝑘?) =0.5 (
Var(? +𝑘?) − Var(?) −
𝑘2Var(?) )=
0.5 (
Var(?) +𝑘2Var(?) +2𝑘Cov(?, ?) −
Var(?) − 𝑘2Var(?) )=
𝑘Cov(?, ?)
If the coefficients are ? =?1 +?2 +?3 and ? =?1 +?2 +?3, then the proof is more complicated:
(46) Var(?1 +?2 +?3, ?1 +?2 +?3) =
Var(?1 +?2 +?3) +Var(?1 +?2 +?3) +
2Cov(?1 +?2 +?3, ?1 +?2 +?3)
(47) Cov(?1 +?2 +?3, ?1 +?2 +?3) =
0.5(Var(?1 +?2 +?3 +?1 +?2 +?3)) −
Var(?1 +?2 +?3) − Var(?1 +?2 +?3)) =
0.5(Var(?1 +?2 +?3 +?1 +?2 +?3)) −
Var(?1 +?2 +?3) − Var(?1 +?2 +?3) =
0.5(Var(?1) +Var(?2) +Var(?3) +Var(?1) +
Var(?2) +Var(?3) +2Cov(?1, ?2) +2Cov(?1, ?3) +
2Cov(?2, ?3) +2Cov(?1, ?1) +2Cov(?1, ?2) +
2Cov(?1, ?3) +2Cov(?2, ?1) +2Cov(?2, ?2) +
2Cov(?2, ?3) +2Cov(?3, ?1) +2Cov(?3, ?2) +
2Cov(?3, ?3) +2Cov(?1, ?2) +2Cov(?1, ?3) +
2Cov(?2, ?3) − Var(?1) − Var(?2) − Var(?3)) −
2Cov(?1, ?2) − 2Cov(?1, ?3) − 2Cov(?2, ?3) −
Var(?1) − Var(?2) − Var(?3) − 2Cov(?1, ?2) −
2Cov(?1, ?3) − 2Cov(?2, ?3)) =Cov(?1, ?1) +
Cov(?1, ?2) +Cov(?1, ?3) +Cov(?2, ?1) +
Cov(?2, ?2) +Cov(?2, ?3) +Cov(?3, ?1) +
Cov(?3, ?2) +Cov(?3, ?3))
Appendix B: Cautions About Software
The same parameters must be used in the variance-covariance matrix, ? and the derivative matrix, ?, but the outputs
from statistical software tools may differ. For example, the Survival package within R software returns the parameters
{β0, β1, log(σε)}, but SAS software’s PROC REG returns parameters {β0, β1, σε}. 2 Although the parameter values can be
transformed, such as σε 2 =exp(log(σε))2, the variance of these parameters is not easily transformed (e.g., Var[log(σε)] =
?).Therefore, if ? is in terms of the parameters {β0, β1, log(σε)}, then the derivatives in ? must also be with respect to
{β0, β1, log(σε)}. The ?, ?, and ?{???} matrices for R and SAS are provided in this appendix.
Appendix B1: POD Using R’s Survival Package
For the simple linear model, μ??? ̂ =(β0 − 𝑦???)⁄β1 and σ??? ̂ =σε⁄β1. However, the Survival package returns
Var(log(σε)) instead of Var(σε). The derivatives with respect to β0 and β1 are the same, but new derivatives were
calculated using a change of variables with τ =log(σε).
The two new derivatives are:
(48)
𝜕(μ???)̂
∂(τ)
=0
∂(σ???) ̂
∂(τ)
=
∂(σ???) ̂
∂(log (σε))
=
∂ (σε
β1
)
∂(log (σε))
=
∂ (exp(log(σε))
β1
)
∂(log (σε))
=
∂ (exp(τ)
β1
)
∂(τ)
=
exp(τ)
β1
=
exp(log(σε))
β1
=σε/β1
(49)
∂μ??? ̂
∂β0
=−
1
β1
∂σ???̂
β0
=0
∂μ??? ̂
𝜕β1
=−
𝑦??? − β0
β2
1
=−
μ???̂
β1
∂σ??? ̂
∂β1
=−σε
β1 2
=−
σ???̂
β1
∂μ???̂
∂ log(σε)
=0
∂σ??? ̂
∂ log(σε)
=
log(σε)
β1
The Survival package within R (survreg function) [24] returns the variance-covariance matrix in Equation 50, so the
matching derivatives matrix is in Equation 51, and the transition matrix is in Equation 52.
Previous Page Next Page