Functions to specify spatial random effects for ratio models. Spatial effects are shared between numerator and denominator by default, which helps prevent spurious ratio effects from spatially-structured unmeasured confounders.
Usage
# S3 method for class 'ratiod_spatial'
print(x, ...)Examples
adj <- matrix(0, 4, 4)
adj[cbind(1:3, 2:4)] <- 1
adj <- adj + t(adj)
spatial_car(adj, group_var = "region")
#> tulpaRatio spatial specification
#> ===========================
#>
#> Type: ICAR (Intrinsic CAR)
#> Level: group
#> Spatial units: 4
#> Shared: Yes (enters both processes)
#> Group variable: region
#> (rho fixed at 1, sum-to-zero constraint applied)
spatial_gp(coords = c("x", "y"))
#> tulpaRatio Gaussian Process spatial specification
#> =============================================
#>
#> Coordinates: x, y
#> Covariance: exponential
#> Neighbors (NNGP): 15
#> Shared: Yes (enters both processes)