
Understand how we can use the delta method to calculate SEs for functions of parameters
See also:

\[Weight_i \sim N(\mu_i, \sigma^2_i)\] \[\mu_i = L_{\infty}(1-e^{-K(Age_i-t_0)})\] \[\sigma^2_i = \sigma^2|\mu_i|^{2\theta}\]
Want to quantify uncertainty in \(\hat{\mu}_i\)!
To quantify uncertainty in,
\[\mu_i = L_\infty(1-\exp(-k Age_i))\]
we have 3 options:
\[\mu_i = L_\infty(1-\exp(-k Age_i))\]
If we estimate \(\theta =(L_\infty, k)\) using Maximum likelihood, and our sample size is large, we know:
\[\hat{\theta} \sim MVN(\theta, I^{-1}(\theta)) \text{ with: }\]
This will allow us to calculate confidence intervals for \(L_{\infty}\) and \(k\).
But, what about:
\(var(\mu_i) = var[f(\hat{L}_\infty, \hat{k})] = var(\hat{L}_\infty(1-\exp(-\hat{k} Age_i)))\)?
In the GLS section, we learned how to calculate the variance of a linear function of our paramters, \(var(\hat{\beta}_0 + X_i\hat{\beta}_1)\), using matrix multiplication:
\[\text{var}(X\beta) = X\Sigma X^T\]
where \(X\) is our design matrix, \(\Sigma\) is the var/cov matrix of our parameters:
\(X = \begin{bmatrix} 1 & X_1\\ 1 & X_2\\ \vdots & \vdots\\ 1 & X_n\\ \end{bmatrix}\) \(\Sigma = \begin{bmatrix} \sigma^2_{\hat{\beta}_0} & \sigma^2_{\hat{\beta}_0,\hat{\beta}_1}\\ \sigma^2_{\hat{\beta}_0,\hat{\beta}_1} & \sigma^2_{\hat{\beta}_1} \\ \end{bmatrix}\)
But, we have a non-linear function of our parameters:
\(\hat{\mu}_i = \hat{L}_\infty(1-\exp(-\hat{k} Age_i))\)
We can use a Taylors series (linear) approximation of the function we are interested in:
\(f(\hat{\theta}) \approx f(\theta) + f'(\theta)(\theta - \hat{\theta})\) \(\implies \widehat{var}(f(\hat{\theta})) \approx f'(\theta)\Sigma f'(\theta)^T |_{\theta=\hat{\theta}}\)
where \(\Sigma\) = the variance of \(\hat{\theta}\) (when \(\theta\) is a single parameter) or the variance/covariance matrix of \(\hat{\theta}\) when \(\theta\) is a vector.
Consider a simple example where we want to estimate \(f(\beta) = 1/\beta\). You are given \(\hat{\beta}\) and its standard error.1
How would we estimate \(var(1/\hat{\beta})\)?
\(f'(\beta) = -1/(\beta^2)\)
\(\widehat{var}(1/\hat{\beta}) = [-1/(\beta^2)](\widehat{var}(\hat{\beta}))[-1/(\beta^2)]\) = \(\frac{\widehat{var}(\hat{\beta})}{\hat{\beta}^4}\)
Let:
Delta Method
\(var(\hat{L}_\infty(1-\exp(-\hat{k} Age_i))) \approx f'(\hat{L}_\infty, \hat{k})\Sigma f'(L_\infty, k)^T|_{L_\infty = \hat{L}_\infty, k=\hat{k}}\)
In R:
deltavar function in the emdbook package to calculate the derivatives and variance; see Section 10.8 in the book%*% for matrix multiplication.