plot_spatial_param: Plot the spatially-dependent parameter for in-sample...

View source: R/posterior_inference.R

plot_spatial_paramR Documentation

Plot the spatially-dependent parameter for in-sample locations.

Description

Plot the spatially-dependent parameter for in-sample locations.

Usage

plot_spatial_param(
  out,
  parameter,
  loadings = 1,
  type = "mean",
  ci.level = c(0.025, 0.975),
  yearscale = TRUE,
  color.gradient = (grDevices::colorRampPalette(rev(RColorBrewer::brewer.pal(9, name =
    "RdBu"))))(50)
)

Arguments

out

Output from BSTFA or BSTFAfull.

parameter

One of 'slope' (default), 'loading', or 'mean'.

loadings

If parameter='loading', an integer indicating which factor loading to plot.

type

One of mean (default), median, ub, or lb indicating which summary statistic to plot at each location.

ci.level

If type='lb' or 'ub', the percentiles for the posterior interval.

yearscale

If parameter='slope', a logical scalar indicating whether to translate it to a yearly scale (TRUE; default).

color.gradient

The color palette to use for the plot. Default is colorRampPalette(rev(RColorBrewer::brewer.pal(9, name='RdBu')))(50).

Value

A plot of spatially-dependent parameter values for the observed locations.

Author(s)

Adam Simpson and Candace Berrett

Examples

data(out.sm)
attach(out.sm)
plot_spatial_param(out.sm, parameter='slope')

BSTFA documentation built on Aug. 28, 2025, 9:09 a.m.