Continuous-time autoregressive residual correlation (source code)

= Continuous-time autoregressive residual correlation
{title2=$\operatorname{Corr}(\varepsilon(s),\varepsilon(t))=e^{-\kappa|s-t|}$}

For $\kappa>0$, this error correlation decreases exponentially with elapsed time and permits irregular observation times. It is the stationary correlation of an <Ornstein-Uhlenbeck process>. Within a <Gaussian linear mixed model>, apply it to the errors conditional on <random effects>; the marginal correlation also includes those effects. `nlme::corCAR1` parametrizes the same correlation by $\rho=e^{-\kappa}\in(0,1)$ and permits separate grouped time series.