Background
I used the nlme
package to implement a mixed effects model with an AR(1) correlation structure on the residuals.
In nlme
, the grouping structure of the AR(1) process must be the same as the random effects structure, as far as I understand. While my AR(1) process was in fact discrete-time, because I had missing data within my random effects groups, I had to instead implement this as a continuous-time AR(1) model (?corCAR1
). To my knowledge, I cannot simply specify that there are multiple AR(1) groups nested within my random effect groupings.
Question
I've calculated some confidence intervals, and I wanted to make a short parametric bootstrap to make sure that my math was correct (my calculated confidence bands from the models covariance matrix agree with the parametric bootstrapped confidence bands).
Trying to simulate new datasets, I realised it's not clear to me exactly what the continuous-time AR(1) process is. help(corCAR1)
doesn't give any mathematical details, but only references to three textbooks.
- Does anyone know how continuous-time AR(1) process are implemented in the
nlme
package? I'm aware that an Ornstein-Uhlenbeck process is considered an continuous time analogue of the AR(1) process... but I'm not sure if there are other implementations I'm not aware of whichnlme
may be using.
Extra info
In case more information is needed, below I've put the model summary.
Linear mixed-effects model fit by REML
Data: data
AIC BIC logLik
-6472.216 -6415.398 3244.108
Random effects:
Formula: ~1 | fish
(Intercept) Residual
StdDev: 0.09100886 0.2251129
Correlation Structure: Continuous AR(1)
Formula: ~time.2 | fish
Parameter estimate(s):
Phi
0.6738598
Fixed effects: distance_log ~ period + current_speed + tide_m
Value Std.Error DF t-value p-value
(Intercept) 1.2148390 0.02487684 8957 48.83414 0.0000
periodDuring 0.0228981 0.01208525 8957 1.89471 0.0582
periodAfter 0.0519890 0.01285010 8957 4.04581 0.0001
current_speed 0.1018782 0.01850602 8957 5.50514 0.0000
tide_m -0.0088376 0.00490187 8957 -1.80290 0.0714
Correlation:
(Intr) prdDrn prdAft crrnt_
periodDuring -0.292
periodAfter -0.249 0.451
current_speed -0.432 0.178 0.092
tide_m 0.083 -0.054 0.015 -0.197
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-6.30361758 -0.56513258 -0.01809098 0.46685852 4.81926579
Number of Observations: 8980
Number of Groups: 19
```
CAR1_mat
). $\endgroup$CAR(1)
residuals? Whats the continuous-time version of the AR(1)'s $ y_i = \phi y_{i-1} + \epsilon$? I'm assuming the variance of $\epsilon$ needs to vary with respect to the lag value in the continuous time version. $\endgroup$