temporal_rtr: Restricted temporal regression (RTR)

View source: R/temporal_rtr_posteriors.R

temporal_rtrR Documentation

Restricted temporal regression (RTR)

Description

The temporal analogue of spatial_rsr(): constrain a temporal random effect to be orthogonal to a set of covariates, so a temporally smooth covariate does not have its fixed-effect coefficient attenuated by a confounded temporal field, u_{RTR} = (I - P_X) u.

No tulpa backend applies that projection to a temporal field, so this constructor errors rather than returning a specification that would fit as the unrestricted temporal model. spatial_rsr() is the wired spatial analogue.

Usage

temporal_rtr(temporal, restrict_to)

Arguments

temporal

A tulpa_temporal specification (e.g. temporal_rw1(), temporal_ar1()).

restrict_to

A one-sided formula giving the covariate space the temporal effect is made orthogonal to, e.g. ~ x.

Value

Nothing: the call always signals an error.

See Also

spatial_rsr(), temporal_rw1(), temporal_ar1()

Examples

# No backend fits a restricted temporal field, so the constructor refuses:
try(temporal_rtr(temporal_rw1("year"), ~ x))

tulpa documentation built on Oct. 19, 2026, 5:09 p.m.