Skip to contents

Repeated measurements can vary for three different reasons. Individuals or sites may have stable baseline differences, their deviations may persist through time, and each observation has independent residual noise. Gaussian temporal AR1 and OU models separate those components while estimating the effects of treatments or other predictors.

For observation tt in series ii, the model is

yit=xitTβ+bi+ait+ϵit, y_{it}=x_{it}^{T}\beta+b_i+a_{it}+\epsilon_{it},

where bib_i is the stable series intercept, aita_{it} is a stationary temporal process with covariance Cov⁡(ait,ais)=sa2ϕ|t−s|\operatorname{Cov}(a_{it},a_{is})=s_a^2\phi^{|t-s|}, and ϵit\epsilon_{it} is independent residual noise. The process SD sas_a, ordinary-intercept SD sbs_b, and residual SD σ\sigma measure different sources of variation. Persistence ϕ\phi is the correlation one occasion apart and can be negative or positive.

A repeated-site example

This example creates measurements from sites visited on genuinely irregular integer occasions. The gap between occasions 1 and 3 remains a two-occasion gap when the model is fitted.

set.seed(20260908)
n_site <- 48
occasion_values <- c(0L, 1L, 3L, 4L, 6L, 7L)
n_time <- length(occasion_values)

site <- factor(rep(paste0("site_", seq_len(n_site)), each = n_time))
occasion <- rep(occasion_values, n_site)
treatment <- rep(rep(c(0, 1), length.out = n_time), n_site)

R_ar1 <- 0.55 ^ abs(outer(occasion_values, occasion_values, "-"))
temporal_effect <- unlist(lapply(seq_len(n_site), function(i) {
  as.vector(t(chol(R_ar1)) %*% rnorm(n_time, sd = 0.70))
}), use.names = FALSE)
site_intercept <- rep(rnorm(n_site, sd = 0.50), each = n_time)

dat <- data.frame(
  y = 1.2 + 0.45 * treatment + 0.08 * occasion +
    site_intercept + temporal_effect + rnorm(n_site * n_time, sd = 0.45),
  treatment = treatment,
  occasion = occasion,
  site = site
)

Fit an ordinary random intercept and the temporal process together. Both terms use site; the first captures stable site-to-site differences and the second captures deviations through time within each site. Here treatment compares treated and untreated visits within sites after accounting for a linear occasion trend.

fit <- drmTMB(
  bf(
    y ~ treatment + occasion +
      (1 | site) +
      temporal(1 | site, time = occasion, structure = "ar1"),
    sigma ~ 1
  ),
  data = dat,
  family = gaussian(),
  REML = FALSE
)

summary(fit, conf.int = TRUE, method = "wald")
#> <summary.drmTMB>
#> estimator: ML
#> confidence intervals: wald, level = 0.95
#>                      estimate  std_error  conf.low conf.high conf.level
#> mu:(Intercept)     1.08376974 0.12741741 0.8340362 1.3335033       0.95
#> mu:treatment       0.49554762 0.07268201 0.3530935 0.6380017       0.95
#> mu:occasion        0.06385317 0.02104404 0.0226076 0.1050987       0.95
#> sigma:(Intercept) -0.65698384         NA        NA        NA       0.95
#>                   conf.method   conf.status profile.boundary profile.message
#> mu:(Intercept)           wald          wald               NA            <NA>
#> mu:treatment             wald          wald               NA            <NA>
#> mu:occasion              wald          wald               NA            <NA>
#> sigma:(Intercept)        wald not_requested               NA            <NA>
#> Distributional, random-effect, scale, and correlation parameters:
#>                                                                                           component
#> sigma                                                                          distributional-scale
#> sd:mu:(1 | site)                                                                   random-effect-sd
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1")          random-effect-sd
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       random-effect-correlation
#>                                                                               dpar
#> sigma                                                                        sigma
#> sd:mu:(1 | site)                                                                mu
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1")       mu
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       temporal
#>                                                                                                                                          term
#> sigma                                                                                                                              (constant)
#> sd:mu:(1 | site)                                                                                                                   (1 | site)
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1") temporal_sd: temporal(1 | site, time = occasion, structure = "ar1")
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")                    temporal(1 | site, time = occasion, structure = "ar1")
#>                                                                            estimate
#> sigma                                                                     0.5184126
#> sd:mu:(1 | site)                                                          0.5624106
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1") 0.5815456
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       0.6728736
#>                                                                              scale
#> sigma                                                                     response
#> sd:mu:(1 | site)                                                          response
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1") response
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       response
#>                                                                                conf.status
#> sigma                                                                     wald_unavailable
#> sd:mu:(1 | site)                                                          wald_unavailable
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1") wald_unavailable
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       wald_unavailable
#> Temporal fit: sigma, SD, persistence, decay, and lag-correlation rows are point
#> estimates only; their standard errors are withheld.
#> Derived summaries:
#>                                                quantity level group       term
#> derived:total_variance_share(site) total_variance_share group  site (1 | site)
#>                                     estimate random_effect_variance
#> derived:total_variance_share(site) 0.3425993              0.3163057
#>                                    residual_variance
#> derived:total_variance_share(site)         0.2687516
#>                                                     conf.status
#> derived:total_variance_share(site) derived_interval_unavailable
#> logLik: -345.3
#> convergence_status: converged
#> convergence: 0
confint(fit, method = "wald")
#>                   parm level     lower     upper scale   transformation
#> 1 fixef:mu:(Intercept)  0.95 0.8340362 1.3335033  link linear_predictor
#> 2   fixef:mu:treatment  0.95 0.3530935 0.6380017  link linear_predictor
#> 3    fixef:mu:occasion  0.95 0.0226076 0.1050987  link linear_predictor
#>   tmb_parameter index method profile.engine conf.status profile.boundary
#> 1       beta_mu     1   wald           <NA>        wald               NA
#> 2       beta_mu     2   wald           <NA>        wald               NA
#> 3       beta_mu     3   wald           <NA>        wald               NA
#>   profile.message
#> 1            <NA>
#> 2            <NA>
#> 3            <NA>

The key point estimates can be collected in one place. The parameters table returned by summary() has one row per variance and correlation parameter, named as in profile_targets(): the ordinary-intercept SD is sd:mu:(1 | site), the temporal process SD is the sd:mu: row whose name continues with temporal_sd, and persistence is the cor:temporal: row. The residual SD is the exponentiated sigma intercept because sigma ~ 1.

parameter_table <- summary(fit)$parameters
parameter_estimate <- function(prefix) {
  unname(parameter_table$estimate[startsWith(rownames(parameter_table), prefix)])
}
key_estimates <- c(
  logLik = as.numeric(logLik(fit)),
  coef(fit, "mu"),
  sd_site = parameter_estimate("sd:mu:(1 | site)"),
  sd_temporal = parameter_estimate("sd:mu:temporal_sd"),
  phi = parameter_estimate("cor:temporal:"),
  sigma = exp(unname(coef(fit, "sigma")))
)
round(key_estimates, 4)
#>      logLik (Intercept)   treatment    occasion     sd_site sd_temporal 
#>   -345.3448      1.0838      0.4955      0.0639      0.5624      0.5815 
#>         phi       sigma 
#>      0.6729      0.5184

The mean-model coefficient rows report the intercept, treatment, and occasion effects with normal-reference Wald intervals. The sd:mu: rows contain separate ordinary-intercept and temporal process SDs, while the cor:temporal: row contains persistence. Read a positive persistence estimate as deviations tending to continue in the same direction over adjacent occasions; read a negative value as alternating deviations.

parameter_table[
  grepl("^(sd:mu:|cor:temporal:)", rownames(parameter_table)),
  "estimate",
  drop = FALSE
]
#>                                                                            estimate
#> sd:mu:(1 | site)                                                          0.5624106
#> sd:mu:temporal_sd: temporal(1 | site, time = occasion, structure = "ar1") 0.5815456
#> cor:temporal:temporal(1 | site, time = occasion, structure = "ar1")       0.6728736
head(fitted(fit))
#> [1] 0.3428136 1.2082309 1.0921929 1.9729076 1.0794728 1.6399819
head(residuals(fit))
#> [1] -0.52251648  0.14765126 -0.18014826  0.64472882 -0.26554322 -0.05395562
simulate(fit, nsim = 2)
#>            sim_1       sim_2
#> 1    1.384901994  1.99788118
#> 2    1.459116786  2.23604516
#> 3    1.521658275  1.62345615
#> 4    2.321495163  1.96724428
#> 5    2.614613379  0.84555469
#> 6    2.580135055  2.20701864
#> 7    1.162723535  0.52575204
#> 8    2.263416624  0.96592900
#> 9    1.357395479  0.83289831
#> 10   1.772144551  0.81551928
#> 11   1.566328504  0.37515490
#> 12   1.699604237  0.82072173
#> 13   0.949195189  2.16073656
#> 14   1.421694430  2.27487511
#> 15   0.526958930  2.51779214
#> 16   2.479955571  3.48538626
#> 17   1.555358621  4.13071736
#> 18   0.899489986  2.01241658
#> 19   3.064229099  1.63208829
#> 20   2.307422764  1.84991759
#> 21   2.152277207 -0.09821945
#> 22   3.009060038 -0.49916772
#> 23   1.951504313  0.34482360
#> 24   3.485607834  1.00538367
#> 25   1.076199848  0.70898070
#> 26   1.236399397  0.70864666
#> 27   0.481820325  0.77053588
#> 28   1.064218012  1.79138993
#> 29   1.177639249  1.10564409
#> 30   1.323157714  0.91058466
#> 31   1.766295047  1.93326911
#> 32   3.835144131  1.27303661
#> 33   2.180140567  1.78004217
#> 34   3.403046808  1.93655694
#> 35   2.639743043  1.58498678
#> 36   3.748591211  1.39581482
#> 37   2.017033919  1.27341974
#> 38   1.977344021  0.63972176
#> 39   1.538879021  0.23923939
#> 40   0.985363699  1.97996026
#> 41   2.670990331  3.21483503
#> 42   3.425270370  2.08471655
#> 43  -0.260348101  0.46890146
#> 44   0.143801004  0.53953984
#> 45   0.255172931  0.53116564
#> 46   1.005253097  1.16705034
#> 47   2.111981994  0.38601133
#> 48   2.550134624  1.98129347
#> 49   1.492369778  3.18879560
#> 50   2.587601696  3.71333471
#> 51   1.613471452  2.60281031
#> 52   1.608389811  3.03472492
#> 53   1.636532036  3.15608161
#> 54   1.635128420  3.00600832
#> 55   0.868132529  1.66562700
#> 56   1.425647069  2.18111040
#> 57   1.180959413 -0.31608733
#> 58   0.209110449  0.90770847
#> 59   1.781828814  1.89965119
#> 60   2.308447811  1.57454322
#> 61   0.105390683  1.49210431
#> 62   0.909666641  1.35383392
#> 63  -0.629926175  1.38090540
#> 64   0.067055389  0.87164900
#> 65  -0.011068986  1.73567827
#> 66   0.254841306  0.79012692
#> 67   0.334317483  3.15373779
#> 68   1.031613600  2.58624112
#> 69   0.548408611  1.76499467
#> 70  -0.717999434  2.65318462
#> 71  -0.204306219  1.85936442
#> 72   1.197657316  1.75310010
#> 73   1.144537817  1.82873187
#> 74   1.768609366  1.35006288
#> 75  -0.060355467  0.91199529
#> 76   1.310854108  1.81877727
#> 77   0.276809219  0.76158019
#> 78   1.372465897  0.88271122
#> 79   1.134961923  0.05467523
#> 80   2.427365463  0.73151546
#> 81   0.674121473  1.55567118
#> 82   2.415249494  1.37821711
#> 83   0.638400985  0.32862047
#> 84   2.374981114  2.55491048
#> 85   1.111481998  0.66002220
#> 86   1.563231941  2.35310305
#> 87   2.379393768  0.34070566
#> 88   1.182591991  2.54091352
#> 89   1.072833063  1.36524724
#> 90   1.626059249  1.64306658
#> 91   2.927406854  0.63111462
#> 92   2.956233590  1.43979662
#> 93   1.626424382  1.89425255
#> 94   1.828368345  1.72146489
#> 95   1.276344345  0.99860182
#> 96   2.769901220  0.45923115
#> 97   1.242365374  2.13152297
#> 98   2.396482540  3.55926915
#> 99  -0.053545175  2.78107490
#> 100  0.215572893  4.64577158
#> 101  1.113102265  3.27843032
#> 102  1.902874483  2.56553417
#> 103  3.176218473 -0.12874203
#> 104  3.586746701  2.07313016
#> 105  1.783536385  1.10819051
#> 106  2.406651441  0.82114914
#> 107  0.143952109  1.71863048
#> 108  1.646538535  2.50062318
#> 109  0.702332220  0.83241890
#> 110  1.280006821  2.25162481
#> 111  1.410128057  1.56636944
#> 112  1.868020664  2.00476252
#> 113  2.257777981  1.32171671
#> 114  1.481509065  3.40322207
#> 115  2.903243849  0.69699769
#> 116  3.133216666  0.71401497
#> 117  2.584149777  1.59752072
#> 118  3.252081766  2.66987350
#> 119  2.937437967  1.51559795
#> 120  4.421441040  1.49167237
#> 121 -0.176100644  1.85570413
#> 122  1.295442082  1.37199672
#> 123  0.175113258 -1.33325678
#> 124  0.962724017  0.24927675
#> 125  1.754811769  1.04391628
#> 126  1.713758410  2.02497942
#> 127  2.318464034  1.46152570
#> 128  3.243219800  1.65374122
#> 129  0.399661932  1.07772866
#> 130  2.170575088  3.68642818
#> 131  3.238783642  2.86580273
#> 132  2.722295001  1.75160673
#> 133  0.379430275  1.97200280
#> 134  1.355629057  0.55273892
#> 135  0.209814779  0.21079724
#> 136  0.530753492  2.25352014
#> 137 -0.747910860  1.40030229
#> 138  0.831529901  2.52348602
#> 139  0.573215512  1.34134226
#> 140  1.245071212  2.15623712
#> 141  0.370746216  1.85093272
#> 142  0.101813793  2.01327147
#> 143 -0.055884209  1.87757748
#> 144  0.513054334  2.19221587
#> 145  2.017811886  0.31860443
#> 146  2.277765929  2.43085847
#> 147  2.767838602  1.50014990
#> 148  3.181404139  2.08844847
#> 149  2.871386031  1.20999049
#> 150  2.768184794  1.71589634
#> 151  0.966508948  1.28617049
#> 152  1.795894856  1.53718071
#> 153  0.363932520  1.15850214
#> 154  1.897514199  2.54739519
#> 155  0.929427723  1.97450224
#> 156 -0.292567822  2.22628533
#> 157  0.086961275  0.76858641
#> 158 -0.268020414  1.32387992
#> 159  1.548904622  1.61576764
#> 160  1.526310026  2.34557518
#> 161  0.083042550  1.66552016
#> 162  0.433032851  1.67636143
#> 163  1.389641888  0.85648371
#> 164  1.224907792  0.97592471
#> 165  1.384771372  3.03614778
#> 166  1.698208500  1.50947223
#> 167 -0.247591059  1.66446151
#> 168  1.341392056  1.64167196
#> 169  0.437916086 -0.15568310
#> 170  1.523131072 -0.31527122
#> 171  0.544133098  0.74395855
#> 172  2.683817895 -0.15414853
#> 173  1.942188219 -0.42911346
#> 174  3.360168059  0.80784688
#> 175  0.597087623  1.51630858
#> 176  2.657566953  2.01860218
#> 177  1.110611032  1.40663320
#> 178  2.247842869  1.71592695
#> 179  0.426691131  2.32340030
#> 180  1.340954663  4.27394331
#> 181  1.574327976  1.62785181
#> 182  3.092787167  2.38411137
#> 183  1.608499943  0.67680162
#> 184  2.388651747  2.97763026
#> 185  1.996031626  1.90242696
#> 186  0.896264247  2.55487066
#> 187  0.327683616  1.79042494
#> 188  1.550667272  2.56582996
#> 189  0.686977378  2.40258333
#> 190  2.974433990  2.68292969
#> 191  3.240319117  2.90651016
#> 192  3.321763649  2.63404902
#> 193  0.578043505  1.01603733
#> 194  1.435153330  0.83147591
#> 195  1.671312869  0.38967965
#> 196  1.512016909  1.29371952
#> 197 -0.008035173  1.91161772
#> 198  1.660478865  2.88155843
#> 199  1.674497972  2.27915954
#> 200  2.430117254  1.19972058
#> 201  2.731921477  0.01407864
#> 202  1.225534674  2.45164248
#> 203  2.708072817  1.57670421
#> 204  1.872859434  2.38450970
#> 205  1.459052740  1.49809291
#> 206  0.788741353  2.12252534
#> 207  0.995571282  1.61433912
#> 208  1.285710761  2.64252040
#> 209  1.263140365  2.56593449
#> 210  0.867486886  2.53012443
#> 211 -0.173568213  0.59597611
#> 212  0.341796244  2.42152033
#> 213  0.815455565  0.32077750
#> 214  2.458836294  1.17253551
#> 215  1.892371708  2.20296537
#> 216  1.604535866  3.05435970
#> 217  2.551297691  2.82976783
#> 218  2.847233619  3.52699548
#> 219  1.443138268  2.84073744
#> 220  3.626986611  3.33075426
#> 221  1.055709411  2.56836141
#> 222  2.116164651  2.12207668
#> 223  1.440973103  1.31277428
#> 224  1.404349975  1.69192598
#> 225  2.593708714  1.43497165
#> 226  1.613036898  0.98943204
#> 227  1.980059785  1.35683072
#> 228  2.623251816  2.54610857
#> 229  0.961232337  1.65014402
#> 230  2.776835548  3.32148838
#> 231  2.090713916  3.23204585
#> 232  2.823443356  1.90329277
#> 233  2.261021050  2.98110840
#> 234  2.069005249  2.23830821
#> 235  2.042221103  0.85283967
#> 236  3.078318204  1.98731456
#> 237  0.465555655  1.23523768
#> 238  1.637112964  0.89888353
#> 239  1.693416393  1.59749315
#> 240  1.246000604  2.46157036
#> 241  0.944736673  0.21050764
#> 242 -0.224855928  1.25085504
#> 243  1.452510175  0.43782320
#> 244  3.422539532 -0.25626643
#> 245  1.008398748  1.25458289
#> 246  1.711286149  1.65945791
#> 247  1.030062206  1.39944055
#> 248  1.491472698  3.80815459
#> 249  0.918437270  3.36220569
#> 250  3.076223445  2.39993636
#> 251  2.681605542  2.81407560
#> 252  2.984658821  4.29303486
#> 253  0.607705876  1.64476092
#> 254  2.057029708  0.92435869
#> 255  1.079726361  0.70847286
#> 256  2.656459268  1.41873196
#> 257  0.610741919  0.58319873
#> 258  1.381994222  1.61877871
#> 259  0.720499303 -0.40990541
#> 260  1.730266140 -0.25279553
#> 261  1.553383426  0.23740795
#> 262  1.872664094  1.23976973
#> 263  0.084945616  0.23994399
#> 264  1.159363604  0.87705098
#> 265  0.586307575  0.88894247
#> 266  0.619057254  1.95882900
#> 267  1.550258199  1.50173036
#> 268  1.638790190  1.31079667
#> 269  1.804557791  0.85861427
#> 270  2.128730936  2.23247574
#> 271  0.316377725  1.02472841
#> 272  0.865850246  0.88370467
#> 273  1.767788909  0.68246977
#> 274  2.136569388  0.79155783
#> 275  2.289835448  0.72479981
#> 276  2.117646064  1.26657766
#> 277  1.467518080  1.91410354
#> 278  1.598319472  3.76997913
#> 279  2.392728842  1.87862021
#> 280  1.180628739  2.54514584
#> 281  2.549593056  2.66559039
#> 282  2.827708974  2.66112179
#> 283 -0.136872233  0.96954539
#> 284  1.278392606  2.13307338
#> 285  2.250546126  1.27556052
#> 286  1.372491945  1.51536007
#> 287  2.111677144  1.19793447
#> 288  1.950515760  1.73528096
simulate(fit, nsim = 2, re.form = NULL)
#> `simulate()` now follows the lme4 `re.form` convention.
#> • `re.form = NA` (the default) or `~0` draws fresh random effects.
#> • `re.form = NULL` holds the fitted random effects fixed.
#> ℹ Earlier drmTMB versions gave the explicit values the reverse meaning; check
#>   code written for them.
#> This message is displayed once per session.
#>           sim_1       sim_2
#> 1   -0.13874200  0.12283811
#> 2    0.54033240  1.18310381
#> 3    0.93769361  1.73548486
#> 4    2.26761471  1.65175747
#> 5    0.46431688  0.89887729
#> 6    1.07152423  1.44956454
#> 7    1.09331248  0.64523636
#> 8    0.85406572  1.74325950
#> 9    1.04616201  1.33029145
#> 10   1.93437097  1.33226785
#> 11   2.99584774  2.11641264
#> 12   2.40360641  2.91379754
#> 13   1.51021905  2.47849402
#> 14   2.58880413  3.34519245
#> 15   2.27195824  2.67241488
#> 16   2.87665791  2.57962040
#> 17   2.48086457  1.88488803
#> 18   2.72301582  2.94898406
#> 19  -0.17789717  0.91229574
#> 20   1.45222639  0.26876728
#> 21   1.42090565  1.67145346
#> 22   1.82806695  1.06529680
#> 23   0.25412749  0.20158937
#> 24   1.85002891  0.74416707
#> 25   0.61742754  0.79117697
#> 26   0.43310242  0.71635443
#> 27   0.86789270  0.62572021
#> 28   0.41948463  1.37092118
#> 29   1.62171396  1.16281959
#> 30   2.47657279  2.14439074
#> 31  -0.54121665  1.41928941
#> 32   0.66536618  1.21050802
#> 33   1.15618288  1.20089406
#> 34   1.56148132  0.50134055
#> 35   1.63446705  1.29375026
#> 36   2.76178986  2.64553309
#> 37   1.46775119  0.19322521
#> 38   0.75108874  0.05275476
#> 39   1.24702892  0.15688152
#> 40   1.23851751  1.30845449
#> 41   0.02618671  1.98160888
#> 42   2.85823349  1.82177672
#> 43   1.52887825  1.19999744
#> 44   3.50166782  2.91985829
#> 45   1.33180550  2.81799273
#> 46   3.50730242  2.62566367
#> 47   2.78272198  2.93634827
#> 48   3.62604087  2.32301956
#> 49   1.53153963  1.76301732
#> 50   2.76039764  3.38441844
#> 51   3.72387829  3.03232299
#> 52   3.33835188  3.23493237
#> 53   3.85392629  2.54781181
#> 54   3.36612816  2.21524012
#> 55   0.93754829  0.58567985
#> 56   1.97043790  2.05741211
#> 57   1.87383166  1.59476767
#> 58   2.53492600  1.44922884
#> 59   1.72308386  2.36412827
#> 60   3.21130013  1.94117271
#> 61   1.60669392  0.48652276
#> 62   0.88512313  1.30735074
#> 63   0.72977458  0.49510520
#> 64   0.74791589  0.76124279
#> 65   1.36505639  0.31233711
#> 66   1.51376814  2.02005493
#> 67   0.67998040  1.65235467
#> 68   0.96402260  0.39485416
#> 69   0.63578584  1.05765548
#> 70   1.74413685  1.88243401
#> 71   0.64335342  0.98972213
#> 72   1.89476610  2.15660848
#> 73  -0.48397934 -0.39686043
#> 74   0.42573825  0.62725802
#> 75   0.01281106 -0.21256486
#> 76  -0.04813366 -0.01300263
#> 77   0.51794149 -0.46479894
#> 78   0.32009273  1.12830782
#> 79   1.19715500  1.18808409
#> 80   0.98451430  1.65020527
#> 81   0.95527187  0.69995163
#> 82   1.37116173  1.85123339
#> 83   1.94515800  0.66791330
#> 84   1.74643977  1.93110774
#> 85   0.63624689  1.22710981
#> 86   1.72269804  2.36351231
#> 87   0.80341030  1.57262749
#> 88   0.68773564  1.60116752
#> 89   1.83466841  1.52791379
#> 90   3.42653944  1.70098273
#> 91   1.91100024  1.86699243
#> 92   1.67556189  2.06870200
#> 93   1.56367725  2.77180071
#> 94   2.39359042  2.90087665
#> 95   1.95852790  2.41939391
#> 96   3.12574680  2.63005958
#> 97   0.22040101  1.25913748
#> 98   2.19361918  2.05609352
#> 99   1.43526408  1.24076928
#> 100  0.23467159 -0.12078363
#> 101  0.97194474  0.94232132
#> 102  1.75147897  2.47052819
#> 103  2.34724395  1.38438214
#> 104  3.18699078  2.32088515
#> 105  1.99530850  2.51822910
#> 106  2.19539492  2.16697410
#> 107  1.90035618  2.33280865
#> 108  1.92569867  2.20593583
#> 109  2.32338538  2.59557372
#> 110  2.53834773  2.11497829
#> 111  2.51759974  1.92392068
#> 112  3.01299271  2.04535216
#> 113  2.59866306  2.60817991
#> 114  3.10669500  2.52666329
#> 115  3.42790408  2.00126029
#> 116  3.81874946  3.08424572
#> 117  1.45510204  1.41583356
#> 118  1.74585083  2.07173256
#> 119  1.42366063  0.95374269
#> 120  2.20091344  2.88068486
#> 121  2.73745078  2.89326657
#> 122  3.38236228  3.20920620
#> 123  2.63759735  1.72119544
#> 124  3.00296483  2.79729409
#> 125  2.43827839  2.51483829
#> 126  2.73219663  2.61945749
#> 127  1.76518525  0.51617891
#> 128  1.07061703  1.44201451
#> 129  0.98120533  1.30564396
#> 130  1.65121561  1.82742272
#> 131  1.16503684  1.08893393
#> 132  0.84903092  1.67277467
#> 133  0.89255858  2.88227657
#> 134  1.80549265  2.19788887
#> 135  1.44331824  1.29898200
#> 136  1.10137092  1.16167096
#> 137  0.89359745  1.71711453
#> 138  2.47297246  2.77425052
#> 139 -0.87594675  0.06904441
#> 140  0.72497949  0.48295813
#> 141  0.65458249  0.82218603
#> 142  2.11902489  0.89862928
#> 143 -0.70025916  0.56743282
#> 144  0.40824105  1.65612175
#> 145  0.14445458  0.13949496
#> 146  0.84554691  0.99072734
#> 147  1.31349599  0.36302259
#> 148  1.43158517  0.70157552
#> 149  1.28745145  0.33217409
#> 150  0.39014391  1.75846466
#> 151 -0.23990263  0.65701637
#> 152  0.63209434  2.05043101
#> 153  0.21862034  0.35543159
#> 154  0.99783002  0.59438091
#> 155  0.67224363  0.92168805
#> 156  2.11244642  2.51357697
#> 157  2.36560569  1.85546734
#> 158  1.51650158  2.60986123
#> 159  1.21864926  0.69613121
#> 160  0.76655334  1.86802187
#> 161  1.47211383  1.40292101
#> 162  2.62343453  1.72756180
#> 163  0.94852285  0.80802809
#> 164  1.79701380  1.82778139
#> 165  1.04529923  2.07745568
#> 166  2.55174094  2.01371137
#> 167  0.10809358 -0.34957916
#> 168  1.42532080  1.55362126
#> 169  0.05738610  0.14312041
#> 170  0.37693473  1.77626419
#> 171  1.98075264 -0.32047241
#> 172  3.24424970  1.94753361
#> 173  2.10480488  1.00434233
#> 174  2.06176305  1.97474205
#> 175  1.54677493  1.22800605
#> 176  2.15592021  2.39595786
#> 177  1.93423601  1.83426153
#> 178  2.78959538  2.76812125
#> 179  3.44863181  3.13653802
#> 180  2.71926187  3.89595286
#> 181  0.61521119 -0.09879659
#> 182  0.55559627  0.64883217
#> 183 -0.78939392 -1.86768061
#> 184  0.40588041  0.40543910
#> 185  0.41800381  0.46796151
#> 186  1.34775202  0.82160720
#> 187  0.95861059  0.73446319
#> 188  2.19185494  1.58352553
#> 189  1.92096106 -0.17526810
#> 190  0.73481461  1.52452746
#> 191  1.61170411  0.61895736
#> 192  1.56246851  1.55904693
#> 193  1.49563654  1.73291225
#> 194  2.56977897  1.89872006
#> 195  1.38147072  1.48982941
#> 196  1.51103645  1.26917893
#> 197  2.11334854  1.09425308
#> 198  1.49921241  1.37887643
#> 199  0.93846004  0.83917025
#> 200  2.26852139  1.06508586
#> 201  1.55277347  0.43447118
#> 202  2.39870964  2.37802905
#> 203  1.51460737  1.59678226
#> 204  2.06737052  2.54288948
#> 205 -0.53269009  0.18333737
#> 206  2.04715036  1.14507574
#> 207  0.75913015  2.46962108
#> 208  1.49110547  1.98930774
#> 209  1.13478772 -0.15536796
#> 210  0.89448961  0.81068327
#> 211  1.44470853  1.52136750
#> 212  0.89957916  2.04319972
#> 213  0.47435887  1.44177792
#> 214  2.11919426  1.30927196
#> 215  1.88832446  2.15367294
#> 216  2.18501852  2.42748135
#> 217  1.86803802  1.73823951
#> 218  3.15218651  3.33045593
#> 219  2.27100711  3.41388646
#> 220  3.12780183  3.21535609
#> 221  1.82915689  2.07751079
#> 222  3.61050226  3.45861009
#> 223  3.19728274  2.42352705
#> 224  3.08978377  3.23022718
#> 225  3.35980232  2.01516395
#> 226  2.91761852  1.82300063
#> 227  2.50603501  2.83823574
#> 228  3.32850807  2.54357105
#> 229  0.61403177  2.08135062
#> 230  2.22159252  2.61155338
#> 231  1.29915616  0.39716568
#> 232  2.38662385  2.11409184
#> 233  1.31421185  2.13159217
#> 234  0.55859021  1.50847906
#> 235  1.93055617  3.13932648
#> 236  2.73014060  2.92220293
#> 237  2.36833977  3.36449248
#> 238  2.72483033  2.46653556
#> 239  2.14331923  1.88184682
#> 240  2.22709688  3.00035457
#> 241  0.11799741  0.12388084
#> 242  1.30295905  1.47523942
#> 243  0.83092441  1.09171186
#> 244  2.21784231  1.36178180
#> 245  1.84216249  1.47973945
#> 246  1.38526717  1.23927021
#> 247  0.75498498  0.33835426
#> 248  2.02413269  1.70526087
#> 249  0.62296883  0.79415740
#> 250  2.26217988  1.96598094
#> 251  0.85767682  0.02525443
#> 252  1.51996052  1.48640271
#> 253 -0.43402596 -0.26777846
#> 254  1.07926413  0.28022222
#> 255  0.84460812  0.99131137
#> 256  1.37254521  1.19932254
#> 257  0.53505549  1.25716157
#> 258  1.86703806  2.70158343
#> 259  2.00423298  1.35420839
#> 260  1.91363363  2.08352746
#> 261  1.77681272  1.10120403
#> 262  2.80442173  2.47195260
#> 263  1.31512846  2.18691485
#> 264  3.10518230  3.67327555
#> 265  0.22454247  1.70336191
#> 266  1.85414500  1.35138426
#> 267  1.32485817 -0.15802972
#> 268  1.33067511  1.39826542
#> 269  0.14656142  0.99480437
#> 270  0.67026962  2.25315984
#> 271  0.38939930  0.33210818
#> 272  1.68330822  0.85400421
#> 273  0.89648758  1.31492028
#> 274  2.55868918  2.30742925
#> 275  1.71660119  0.93726377
#> 276  1.04567195  1.53789924
#> 277  0.40144319 -0.72440755
#> 278  0.18489647  0.70335674
#> 279  0.53719051  0.04120985
#> 280  1.73947728  0.51076413
#> 281  1.75078182  1.39889394
#> 282  1.86408904  1.79858829
#> 283  1.93079326  2.60638777
#> 284  2.08427585  3.04392704
#> 285  1.48912264  1.45869153
#> 286  1.02289262  2.05342121
#> 287  0.92300390  1.25416207
#> 288  1.38604804  1.98941536

fitted() and residuals() are conditional on the estimated site and temporal deviations. The default simulate() call draws fresh stable and temporal effects (re.form = NA), while re.form = NULL retains the fitted conditional effects. Use the first for a new realization from the fitted model and the second to simulate around the observations’ fitted latent structure.

What the intervals cover

For temporal fits, vcov() and Wald confint() deliberately expose only mean coefficients, and only for AR1. Their covariance comes from the full observed marginal-likelihood Hessian, including estimated variance and persistence parameters. The process SD, ordinary-intercept SD, persistence or decay, and residual SD are point estimates in this release.

Likelihood profiles are available for temporal mean coefficients in both AR1 and OU models. Use them when reporting a treatment or other regression effect:

confint(fit, parm = "mu:treatment", method = "profile")
summary(fit, conf.int = TRUE, method = "profile", ci_parm = "mu:treatment")

Omit parm or ci_parm to profile every mean coefficient. Variance-component, persistence or decay, bootstrap, forecasting, and newdata intervals remain unavailable. check_drm(fit) labels a non-positive-definite fitted Hessian as an irregular fitted-likelihood situation: a mean-coefficient profile can still be finite there, but it is not coverage-calibrated. A retained 3,000-fit OU campaign qualified fixed-mu profile intervals across three predeclared 1,000-data-set scenarios: 80 sites measured at 6 or 12 irregular occasions, with and without stable site intercepts. That result does not establish general temporal coverage. The first AR1 calibration pilot found a residual-SD boundary in a primary short-series case, so AR1 profile and Wald intervals remain without a coverage claim.

The fit supports in-sample predictions, fitted values, residuals, and simulation. It does not support forecasting or newdata prediction. Supply a finite integer time column, retain its real gaps, and ensure that every site–occasion pair is unique. If a site was measured more than once at an occasion, aggregate those records before fitting. An AR1-only fit omits (1 | site) but keeps the same temporal() term.

Free correlation by discrete lag with homogeneous Toeplitz

Use homogeneous Toeplitz covariance when every site is measured at the same complete, equally spaced set of discrete occasions and the scientific question is whether correlation departs from AR1’s exponential pattern. It estimates a separate correlation for each lag: visits one occasion apart share cor_lag1, visits two occasions apart share cor_lag2, and so on. This is more flexible than AR1, so it needs a common panel rather than the irregular or incomplete schedules accepted by AR1 and OU, and at least as many series as occasions. That is only a floor: the interval evidence below comes from 80-series panels.

The example below simulates 80 sites, each visited at the same six equally spaced occasions. Its lag correlations (0.60, 0.45, 0.40, 0.30, 0.20) decay more slowly than an AR1 pattern with the same first-lag value would (0.60, 0.36, 0.22, 0.13, 0.08).

set.seed(20261002)
n_site_toep <- 80
toep_occasions <- 0:5
true_cor_lag <- c(0.60, 0.45, 0.40, 0.30, 0.20)
R_toep <- stats::toeplitz(c(1, true_cor_lag))
total_sd <- 0.80

complete_regular_panel <- data.frame(
  site = factor(rep(sprintf("site_%02d", seq_len(n_site_toep)),
                    each = length(toep_occasions))),
  occasion = rep(toep_occasions, n_site_toep),
  treatment = rep(rep(c(0, 1), length.out = length(toep_occasions)),
                  n_site_toep)
)
within_site <- unlist(lapply(seq_len(n_site_toep), function(i) {
  as.vector(t(chol(R_toep)) %*% rnorm(length(toep_occasions), sd = total_sd))
}), use.names = FALSE)
complete_regular_panel$y <- 1.0 + 0.40 * complete_regular_panel$treatment +
  within_site

toeplitz_fit <- drmTMB(
  bf(
    y ~ treatment + temporal(1 | site, time = occasion, structure = "homtoep"),
    sigma ~ 1
  ),
  data = complete_regular_panel,
  family = gaussian(),
  REML = FALSE
)

toeplitz_parameters <- summary(toeplitz_fit)$parameters
lag_rows <- startsWith(rownames(toeplitz_parameters), "cor:temporal:")
toeplitz_estimates <- c(
  logLik = as.numeric(logLik(toeplitz_fit)),
  coef(toeplitz_fit, "mu"),
  sigma_total = unname(sigma(toeplitz_fit)[1L]),
  setNames(
    toeplitz_parameters$estimate[lag_rows],
    toeplitz_parameters$term[lag_rows]
  )
)
round(toeplitz_estimates, 4)
#>      logLik (Intercept)   treatment sigma_total    cor_lag1    cor_lag2 
#>   -465.3119      1.0614      0.3620      0.8005      0.6424      0.4732 
#>    cor_lag3    cor_lag4    cor_lag5 
#>      0.3712      0.2380      0.1779

confint(
  toeplitz_fit,
  parm = "mu:treatment",
  method = "profile",
  profile_engine = "tmbprofile"
)
#>                 parm level     lower     upper scale   transformation
#> 1 fixef:mu:treatment  0.95 0.2886354 0.4353826  link linear_predictor
#>   tmb_parameter index  method profile.engine conf.status profile.boundary
#> 1       beta_mu     2 profile     tmbprofile     profile            FALSE
#>   profile.message
#> 1              ok
check_drm(toeplitz_fit)
#> <drm_check: 19 checks>
#> ok: 17; notes: 2; warnings: 0; errors: 0
#>                       check status
#>       optimizer_convergence     ok
#>          convergence_status     ok
#>            optimizer_budget     ok
#>            finite_objective     ok
#>       logsigma_clamp_active     ok
#>              fixed_gradient     ok
#>             sdreport_status     ok
#>   hessian_positive_definite     ok
#>        hessian_conditioning     ok
#>      standard_errors_finite     ok
#>    standard_errors_inflated     ok
#>               mle_existence     ok
#>  observations_per_parameter     ok
#>                dropped_rows     ok
#>              positive_scale     ok
#>           temporal_boundary     ok
#>          temporal_mean_wald   note
#>       temporal_mean_profile   note
#>    fixed_effect_design_size     ok
#>                                                                                   value
#>                                                                                       0
#>                                                                               converged
#>                                                 iterations=26; function=38; gradient=27
#>                                                                                   465.3
#>                                                                                    <NA>
#>                                                max=0.000000001480; component=beta_sigma
#>                                                                                      ok
#>                                                                                    TRUE
#>                                                               min_eig=73.84; cond=17.73
#>                                                                  range=[0.03699,0.1155]
#>                                   n_inflated=0; max_se=0.1155; reference_median=0.06317
#>                                                                                  finite
#>                                                         n_obs=480; n_par=8; ratio=60.00
#>                                                                     nobs=480; dropped=0
#>                                                                              min=0.8005
#>                                                                                    <NA>
#>                                       unavailable; reason=toeplitz_calibration_deferred
#>                             available_for_this_fit; calibration=qualified_primary_cells
#>  total_mb=0.07104; max_cols=2; largest=mu; largest_class=matrix; largest_density=0.7500
#>                                                                                                                                                                                                                                                                                                                                                                                           message
#>                                                                                                                                                                                                                                                                                                                                                                     nlminb convergence code is 0.
#>                                                                                                                                                                                                                                                                                                  Optimizer convergence and uncertainty diagnostics are consistent with a proper interior optimum.
#>                                                                                                                                                                                                                                                                                                               Optimizer evaluation counts recorded; no eval.max or iter.max control was supplied.
#>                                                                                                                                                                                                                                                                                                                                                          Objective and log-likelihood are finite.
#>                                                                                                                                                                                                                                                                                                                                                The log(sigma) clamp is not active at the optimum.
#>                                                                                                                                                                                                                                                                                                                     Maximum absolute fixed gradient is <= 0.001; largest component is beta_sigma.
#>                                                                                                                                                                                                                                                                                                                                                           TMB::sdreport() completed successfully.
#>                                                                                                                                                                                                                                                                                                                                                     sdreport reports a positive-definite Hessian.
#>  Minimum eigenvalue and condition number of TMB's sdreport() fixed-effect covariance (sdr$cov.fixed), inverted. These are a genuinely different read of the fit's conditioning than TMB's internal pdHess flag -- comparable across fits, not claimed to be numerically identical to any raw TMB gradient or Hessian quantity. This fit's Hessian conditioning is within the requested threshold.
#>                                                                                                                                                                                                                                                                                                                                                      All fixed-effect standard errors are finite.
#>                                                                                                                                                                                                                                                                                                                                No fixed-effect standard error is inflated relative to the others.
#>                                                                                                                                                                                                                                                                                                       The screened fixed-effect geometry is consistent with a finite maximum-likelihood estimate.
#>                                                                                                                                                                                                                                                                                                         Observations per estimated parameter are at or above the small-samplenote threshold (10).
#>                                                                                                                                                                                                                                                                                                                                No rows were dropped by model-frame or known-covariance filtering.
#>                                                                                                                                                                                                                                                                                                                                                  All fitted scale values are finite and positive.
#>                                                                                                                                                                                                                                                                                                              Residual sigma and the temporal persistence or decay are away from their boundaries.
#>                                                                                                                                                                                                         Homogeneous Toeplitz mean-coefficient Wald intervals remain unavailable. Fixed-mean likelihood profiles are qualified in the retained primary cells; Wald covariance remains unavailable.
#>                                                                                                      Temporal mean-coefficient profile intervals are available for this fit. A retained 4,000-fit campaign qualified mean-coefficient profile intervals in its three predeclared 80-series, six-occasion primary cells; this fit-level status does not extend that result to other panel designs.
#>                                                                                                                                                                                                                                                                                                                                       Dense fixed-effect design matrices are modest for this fit.

Here sigma is the total within-site SD of the Toeplitz covariance. The model does not separately estimate a temporal-process SD, an independent residual SD, or an ordinary (1 | site) intercept, because those components are not separately identifiable when the correlation at every lag is free. The profile interval applies only to mean regression effects such as mu:treatment. Wald, total-scale, and lag-correlation intervals remain unavailable.

A retained 4,000-fit campaign qualified these mean-effect profiles in three predeclared 80-site, six-occasion panels: AR1-shaped, non-exponential, and negative first-lag correlation patterns. The 20-site stress panel had lower intercept coverage, so this is evidence for those primary panel designs, not a coverage claim for every Toeplitz analysis. Use check_drm(toeplitz_fit) and inspect the profile before reporting an interval. If elapsed gaps are genuinely irregular, use OU instead.

Irregular elapsed time with OU

Use an OU field when elapsed intervals carry meaning, such as visits at 0, 0.5, 2.5, and 5 days. It keeps the same three-way variance separation but estimates a positive decay rate, so correlation over a gap d is exp(-decay * d). It cannot represent alternating negative temporal correlation.

set.seed(20260909)
elapsed_values <- c(0, 0.5, 2.5, 5)
n_ou_site <- 24
site_ou <- factor(rep(paste0("ou_site_", seq_len(n_ou_site)), each = length(elapsed_values)))
elapsed_days <- rep(elapsed_values, n_ou_site)
treatment_ou <- rep(rep(c(0, 1), length.out = length(elapsed_values)), n_ou_site)

R_ou <- exp(-0.45 * abs(outer(elapsed_values, elapsed_values, "-")))
ou_effect <- unlist(lapply(seq_len(n_ou_site), function(i) {
  as.vector(t(chol(R_ou)) %*% rnorm(length(elapsed_values), sd = 0.65))
}), use.names = FALSE)
dat_irregular <- data.frame(
  y = 0.8 + 0.35 * treatment_ou +
    rep(rnorm(n_ou_site, sd = 0.45), each = length(elapsed_values)) +
    ou_effect + rnorm(n_ou_site * length(elapsed_values), sd = 0.40),
  treatment = treatment_ou,
  site = site_ou,
  elapsed_days = elapsed_days
)

ou_fit <- drmTMB(
  bf(y ~ treatment + (1 | site) +
       temporal(1 | site, time = elapsed_days, structure = "ou"), sigma ~ 1),
  data = dat_irregular, family = gaussian(), REML = FALSE
)
summary(ou_fit)
#> <summary.drmTMB>
#> estimator: ML
#> standard errors: unavailable; OU coefficient table is point estimates only (OU
#> Wald inference is deferred pending the inherited AR1 calibration prerequisite)
#>                     estimate std_error          std_error.status
#> mu:(Intercept)     0.8494095        NA temporal_wald_unqualified
#> mu:treatment       0.3713431        NA temporal_wald_unqualified
#> sigma:(Intercept) -1.6601429        NA temporal_wald_unqualified
#> Distributional, random-effect, scale, and correlation parameters:
#>                                                                                         component
#> sigma                                                                        distributional-scale
#> sd:mu:(1 | site)                                                                 random-effect-sd
#> sd:mu:temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou")     random-effect-sd
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou")           temporal-decay
#>                                                                                  dpar
#> sigma                                                                           sigma
#> sd:mu:(1 | site)                                                                   mu
#> sd:mu:temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou")       mu
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou")     temporal
#>                                                                                                                                                term
#> sigma                                                                                                                                    (constant)
#> sd:mu:(1 | site)                                                                                                                         (1 | site)
#> sd:mu:temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou") temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou")
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou")                  temporal(1 | site, time = elapsed_days, structure = "ou")
#>                                                                               estimate
#> sigma                                                                        0.1901118
#> sd:mu:(1 | site)                                                             0.5976810
#> sd:mu:temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou") 0.6784555
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou")     0.4927937
#>                                                                                 scale
#> sigma                                                                        response
#> sd:mu:(1 | site)                                                             response
#> sd:mu:temporal_sd: temporal(1 | site, time = elapsed_days, structure = "ou") response
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou")     response
#> Temporal fit: sigma, SD, persistence, decay, and lag-correlation rows are point
#> estimates only; their standard errors are withheld.
#> Derived summaries:
#>                                                quantity level group       term
#> derived:total_variance_share(site) total_variance_share group  site (1 | site)
#>                                     estimate random_effect_variance
#> derived:total_variance_share(site) 0.4184566              0.3572226
#>                                    residual_variance
#> derived:total_variance_share(site)         0.0361425
#> logLik: -102.6
#> convergence_status: converged
#> convergence: 0
ou_parameter_table <- summary(ou_fit)$parameters
ou_parameter_table[
  startsWith(rownames(ou_parameter_table), "decay:temporal:"),
  "estimate",
  drop = FALSE
]
#>                                                                           estimate
#> decay:temporal:temporal(1 | site, time = elapsed_days, structure = "ou") 0.4927937

ou_estimate <- function(prefix) {
  unname(ou_parameter_table$estimate[startsWith(rownames(ou_parameter_table), prefix)])
}
ou_key_estimates <- c(
  logLik = as.numeric(logLik(ou_fit)),
  coef(ou_fit, "mu"),
  sd_site = ou_estimate("sd:mu:(1 | site)"),
  sd_temporal = ou_estimate("sd:mu:temporal_sd"),
  decay = ou_estimate("decay:temporal:"),
  sigma = exp(unname(coef(ou_fit, "sigma")))
)
round(ou_key_estimates, 4)
#>      logLik (Intercept)   treatment     sd_site sd_temporal       decay 
#>   -102.5806      0.8494      0.3713      0.5977      0.6785      0.4928 
#>       sigma 
#>      0.1901
confint(ou_fit, parm = "mu:treatment", method = "profile")
#>                 parm level     lower     upper scale   transformation
#> 1 fixef:mu:treatment  0.95 0.1835334 0.5452362  link linear_predictor
#>   tmb_parameter index  method profile.engine conf.status profile.boundary
#> 1       beta_mu     2 profile     tmbprofile     profile            FALSE
#>   profile.message
#> 1              ok
check_drm(ou_fit)
#> <drm_check: 22 checks>
#> ok: 19; notes: 3; warnings: 0; errors: 0
#>                         check status
#>         optimizer_convergence     ok
#>            convergence_status     ok
#>              optimizer_budget     ok
#>              finite_objective     ok
#>         logsigma_clamp_active     ok
#>                fixed_gradient     ok
#>               sdreport_status     ok
#>     hessian_positive_definite     ok
#>          hessian_conditioning     ok
#>        standard_errors_finite     ok
#>      standard_errors_inflated     ok
#>                 mle_existence     ok
#>    observations_per_parameter     ok
#>                  dropped_rows     ok
#>                positive_scale     ok
#>     random_effect_sd_boundary     ok
#>    interval_reliability_scope   note
#>             temporal_boundary     ok
#>            temporal_mean_wald   note
#>         temporal_mean_profile   note
#>      fixed_effect_design_size     ok
#>  mu_random_effect_replication     ok
#>                                                                                   value
#>                                                                                       0
#>                                                                               converged
#>                                                 iterations=24; function=30; gradient=25
#>                                                                                   102.6
#>                                                                                    <NA>
#>                                         max=0.00000000005428; component=log_sd_temporal
#>                                                                                      ok
#>                                                                                    TRUE
#>                                                              min_eig=0.4055; cond=360.1
#>                                                                   range=[0.08957,1.343]
#>                                     n_inflated=0; max_se=1.343; reference_median=0.2573
#>                                                                                  finite
#>                                                          n_obs=96; n_par=6; ratio=16.00
#>                                                                      nobs=96; dropped=0
#>                                                                              min=0.1901
#>                                      min=0.5977; boundary=0.0001000; term=mu.(1 | site)
#>                                                           sd_targets=2; assessed_here=0
#>                                                                                    <NA>
#>                                                unavailable; reason=calibration_deferred
#>                                         available_for_this_fit; calibration=unqualified
#>  total_mb=0.01537; max_cols=2; largest=mu; largest_class=matrix; largest_density=0.7500
#>                                                                            (1 | site)=4
#>                                                                                                                                                                                                                                                                                                                                                                                           message
#>                                                                                                                                                                                                                                                                                                                                                                     nlminb convergence code is 0.
#>                                                                                                                                                                                                                                                                                                  Optimizer convergence and uncertainty diagnostics are consistent with a proper interior optimum.
#>                                                                                                                                                                                                                                                                                                               Optimizer evaluation counts recorded; no eval.max or iter.max control was supplied.
#>                                                                                                                                                                                                                                                                                                                                                          Objective and log-likelihood are finite.
#>                                                                                                                                                                                                                                                                                                                                                The log(sigma) clamp is not active at the optimum.
#>                                                                                                                                                                                                                                                                                                                Maximum absolute fixed gradient is <= 0.001; largest component is log_sd_temporal.
#>                                                                                                                                                                                                                                                                                                                                                           TMB::sdreport() completed successfully.
#>                                                                                                                                                                                                                                                                                                                                                     sdreport reports a positive-definite Hessian.
#>  Minimum eigenvalue and condition number of TMB's sdreport() fixed-effect covariance (sdr$cov.fixed), inverted. These are a genuinely different read of the fit's conditioning than TMB's internal pdHess flag -- comparable across fits, not claimed to be numerically identical to any raw TMB gradient or Hessian quantity. This fit's Hessian conditioning is within the requested threshold.
#>                                                                                                                                                                                                                                                                                                                                                      All fixed-effect standard errors are finite.
#>                                                                                                                                                                                                                                                                                                                                No fixed-effect standard error is inflated relative to the others.
#>                                                                                                                                                                                                                                                                                                       The screened fixed-effect geometry is consistent with a finite maximum-likelihood estimate.
#>                                                                                                                                                                                                                                                                                                         Observations per estimated parameter are at or above the small-samplenote threshold (10).
#>                                                                                                                                                                                                                                                                                                                                No rows were dropped by model-frame or known-covariance filtering.
#>                                                                                                                                                                                                                                                                                                                                                  All fitted scale values are finite and positive.
#>                                                                                                                                                                                                                                                                      All fitted random-effect standard deviations are finite, positive, and above the requested lower-boundary warning threshold.
#>                                                          This fit has 2 random-effect standard-deviation targets. `check_drm()` assesses the fit, not interval reliability: a target can pass every check above and still return an interval that `confint()` warns about at a variance boundary. Before reporting an interval, call `confint()` and read `conf.status` and any boundary warning.
#>                                                                                                                                                                                                                                                                                                              Residual sigma and the temporal persistence or decay are away from their boundaries.
#>                                                                                                                                                                                                                                                             OU mean-coefficient Wald intervals are intentionally unavailable while the inherited AR1 calibration prerequisite remains unresolved.
#>                                                                                                                                                                                                            Temporal mean-coefficient profile intervals are available for this fit. Their general coverage calibration remains unresolved; do not treat this fit-level status as a coverage claim.
#>                                                                                                                                                                                                                                                                                                                                       Dense fixed-effect design matrices are modest for this fit.
#>                                                                                                                                                                                                                                                                                                                                   Every random-effect level has at least two fitted observations.
head(fitted(ou_fit))
#> [1] 0.89988381 1.17897178 1.01573386 1.28931555 0.00698083 0.13585648
simulate(ou_fit, nsim = 2)
#>          sim_1       sim_2
#> 1  -0.59522038  0.20434524
#> 2   0.01450390  1.10553122
#> 3  -0.08749168 -0.51570063
#> 4   1.24797184  0.26513373
#> 5   0.15162046  2.04001673
#> 6   0.65045845  1.99891346
#> 7   0.44800547  0.01373069
#> 8   1.67472916  1.35994131
#> 9   0.72793925 -0.36203027
#> 10  2.03436719  0.79852631
#> 11  0.99263935 -0.50162962
#> 12  1.24341346 -1.46867745
#> 13  0.37270309  2.95581346
#> 14  1.13546267  3.41567659
#> 15  0.50946556  2.00329308
#> 16  1.41419633  1.29735464
#> 17  1.13615931  0.43309892
#> 18  0.87751033  0.92086173
#> 19  1.57444519  1.21644920
#> 20  1.24723530  2.80819653
#> 21  0.41757777  0.22109516
#> 22  0.88826861  0.78921125
#> 23  1.59223815  1.74062159
#> 24  2.26920689  1.92929643
#> 25  1.36083338  3.18125303
#> 26  2.20444826  2.71385482
#> 27  0.70015940  2.34975162
#> 28 -0.56937840  2.60834913
#> 29  0.47533744  0.37746942
#> 30  0.28997886  0.96135078
#> 31  0.16641115  2.17911939
#> 32  0.34015597  0.76980844
#> 33 -0.08248560  0.70998948
#> 34 -0.41865910  0.35156224
#> 35 -0.50314079 -0.51952861
#> 36  0.56208255  1.04448845
#> 37  1.06236616  0.58882365
#> 38  2.32105517  1.06878594
#> 39  1.90468955  0.15937584
#> 40  1.73107339  0.99457811
#> 41  0.68509094 -0.04893497
#> 42  2.16540201 -0.36270316
#> 43  1.67334168 -0.77896152
#> 44  0.11005899 -0.06189811
#> 45  0.46540985  1.42527522
#> 46  0.93776156  1.59938895
#> 47  0.76161180  1.10714990
#> 48  2.05417141  1.88610447
#> 49  0.12750038  0.29476591
#> 50  1.03243955  0.09530639
#> 51 -0.29425160  0.98405916
#> 52  0.34408970  0.04110802
#> 53 -1.11152828  0.38957172
#> 54 -1.13369369  1.14371417
#> 55 -1.16509139  1.03504681
#> 56 -0.24697154  0.99260338
#> 57  1.01230610  1.66360839
#> 58  1.94332245  1.42803621
#> 59  1.07222483  0.57157250
#> 60  3.53861379  0.81955826
#> 61 -0.64774870  1.99010637
#> 62  0.04719975  1.75753063
#> 63 -1.25527812  0.72689521
#> 64  1.14964789  2.26567007
#> 65 -1.73148361  1.35808668
#> 66 -0.72547489  2.14945662
#> 67 -0.47132915  0.81925778
#> 68 -0.24191202  2.22850185
#> 69  0.76603490  0.56525353
#> 70  0.77549639  0.86815193
#> 71  1.38085210  0.70067906
#> 72  2.38493454  0.30900241
#> 73  0.63858055  0.21841883
#> 74  0.05915441  0.82756389
#> 75 -0.46980121  1.42172551
#> 76  0.28474450  1.33184236
#> 77  0.90045901  0.12260594
#> 78  1.64349029 -0.15069085
#> 79  1.27007961 -0.55560346
#> 80  0.78563108  0.67366123
#> 81 -0.44895909  2.31366247
#> 82  0.66627651  2.17679445
#> 83  0.98049413  1.91192992
#> 84  1.43109945  1.18725144
#> 85 -0.17335688  1.46636402
#> 86  0.11813143  1.98946915
#> 87  0.51325724  1.06964150
#> 88  1.33007754  2.10763307
#> 89  1.30914714  2.38807886
#> 90  0.43927229  3.41663092
#> 91  0.72924798  2.60583027
#> 92  0.77956106  3.67747664
#> 93 -0.49797730  2.10482105
#> 94  0.20935863  2.80238870
#> 95 -0.32308980  1.90467093
#> 96  2.16373818  0.98015654

With only four time points per site, this example separates the residual SD and the OU process weakly. The data were simulated with sigma = 0.40 and a process SD of 0.65, but the fit attributes most of the within-site variation to the OU process (estimated sigma about 0.19, process SD about 0.68). Do not read the split between sigma and the process SD as well determined from a design this short; more occasions per series are needed for that.

For OU, elapsed_days must be finite numeric, genuine gaps are retained, and duplicate site–time records must be aggregated before fitting. Input order may be shuffled. In-sample fitted values, residuals, and conditional or fresh simulation follow the AR1 conventions. Forecasting and newdata prediction remain unavailable. The decay:temporal: row of summary(ou_fit)$parameters is the positive decay rate in the units of elapsed_days: if you change days to hours, the numerical rate changes by the inverse factor while the fitted correlation over a physical gap does not. OU Wald inference through vcov(), confint(..., method = "wald"), and summary(..., conf.int = TRUE, method = "wald") remains unavailable. Use confint(..., parm = "mu:<coefficient>", method = "profile") for a mean effect, read its conf.status, and inspect check_drm(ou_fit) before reporting it. Report it only when check_drm(ou_fit) has no temporal_mean_profile warning; finite endpoints alone are not calibration evidence outside the retained U1–U3 campaign cells. OU decay and variance-component intervals remain unavailable.