### Matrix repair

#### (Nov 25, 2019)

When fitting a statistical model we want two things as a minimum:

1. The parameter estimates, e.g. the maximum-likelihood estimates (MLEs), and
2. The estimated variance-covariance matrix, $$\hat V$$, for those estimates.

We can get both from the log-likelihood: the MLEs maximise the value of the log-likelihood function, and an approximation for the covariance matrix comes from inverting the negative information matrix, $$\mathcal J$$, i.e. the matrix of second partial derivatives evaluated at the MLEs. However, the limitations of computer arithmetic can sometimes get in the way, as shown in the information matrix in Figure 1:

Figure 1. Information matrix, $$\mathcal J$$, for a five-parameter model. Only…