temporal() adds a Gaussian temporal structure for repeated observations
within a sampled individual or site. structure = "ar1" uses finite integer
occasions and permits signed one-occasion persistence. structure = "ou"
uses finite numeric elapsed time and estimates a positive decay rate, so
correlation at a gap d is exp(-decay * d). structure = "homtoep"
uses a common, complete, equally spaced integer schedule and estimates one
correlation for each discrete lag. It is a marginal covariance model: its
sigma is the total within-series SD, with no separately estimated iid
residual SD or temporal conditional mode. An ordinary (1 | id) may
accompany AR1 or OU to represent stable between-series differences separately
from persistent within-series deviations; it is deferred for homogeneous
Toeplitz covariance. Homogeneous Toeplitz fits provide likelihood-profile
intervals for mean regression coefficients only. Scale and lag-correlation
intervals remain unavailable.
Development only: with structure = "ou", temporal() may be paired with
phylo(1 | species, tree = tree) on the same grouping column. That fits a
stable tree-correlated species intercept plus independent within-species OU
deviations, reported as sd_phylo_stable, sd_temporal and
decay_temporal. The paired route refuses an ordinary (1 | species)
intercept (the stable component is already the phylogenetic term), needs
tree tips that exactly match the observed species, at least three species,
two distinct times per species and three distinct positive lags, and has
point estimates only: its intervals are not calibrated.
Examples
bf(y ~ treatment + temporal(1 | id, time = occasion, structure = "ar1"),
sigma ~ 1)
#> <drm_formula>
#> y ~ treatment + temporal(1 | id, time = occasion, structure = "ar1")
#> sigma ~ 1
bf(y ~ treatment + temporal(1 | id, time = elapsed, structure = "ou"),
sigma ~ 1)
#> <drm_formula>
#> y ~ treatment + temporal(1 | id, time = elapsed, structure = "ou")
#> sigma ~ 1
bf(y ~ treatment + temporal(1 | id, time = occasion, structure = "homtoep"),
sigma ~ 1)
#> <drm_formula>
#> y ~ treatment + temporal(1 | id, time = occasion, structure = "homtoep")
#> sigma ~ 1