Build a prior list for tulpa_nested_laplace() from a tulpa spec object
Source: R/nested_laplace.R
prior_from_spec.RdValidates a tulpa_temporal or tulpa_spatial specification against
data, then converts it to the prior list shape consumed by
tulpa_nested_laplace(). Mainly an internal helper for callers that already
have a fitted spec; users typically pass spec + data directly to
tulpa_nested_laplace() instead.
Supported spec types:
tulpa_temporalwithtype in {"rw1", "rw2", "ar1"}tulpa_spatial, arealtype in {"car", "icar", "car_proper", "bym2"}. An areal spec returns the graph fields only –type,spatial_idx,n_spatial_units,adj_row_ptr,adj_col_idx,n_neighbors– plusscale_factorfor bym2 and the eigenvalue-derivedrho_boundsfor proper CAR. No grid field is returned for any areal type: the outer axes are built later by the family's registrydefaults()closure, and proper CAR's(tau, rho)grid is built there from those bounds.tulpa_gp/tulpa_hsgp, continuoustype in {"gp", "nngp", "hsgp"}: validated againstdataand routed to thenngp/hsgpnested kernel through the shared converter.
SPDE is the one continuous field not built here – it carries its own
(range, sigma) FEM integrator; call fit_spde() with the spatial_spde()
spec.
Value
A prior list ready for tulpa_nested_laplace().