Learn R Programming

BSTFA (version 0.1.0)

plot_factor: Plot the temporally-dependent factors.

Description

Plot the temporally-dependent factors.

Usage

plot_factor(
  out,
  factor = 1,
  together = FALSE,
  include.legend = TRUE,
  type = "mean",
  uncertainty = TRUE,
  ci.level = c(0.025, 0.975),
  xrange = NULL
)

Value

A plot of spatially-dependent parameter values for a grid of interpolated locations.

Arguments

out

Output from BSTFA or BSTFAfull.

factor

Integer or vector of integers specifying which factor(s) to plot.

together

If length(factor)>1, logical scalar specifying whether to plot all factors on a single plot. Default is FALSE.

include.legend

If length(factor)>1 and together=TRUE, a logical scalar specifying whether to include a legend. Default is TRUE.

type

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

uncertainty

Logical scalar indicating whether to include lower and upper credible interval bounds for the parameter. Default is FALSE.

ci.level

A vector of length 2 specifying the quantiles to use for lower and upper bounds for type='lb', type='ub', or uncertainty=TRUE.

xrange

A date vector of length 2 providing the lower and upper bounds of the dates to include in the plot.

Author

Candace Berrett and Adam Simpson

Examples

Run this code
data(out.sm)
attach(out.sm)
plot_factor(out.sm, factor=1:4, together=TRUE)

Run the code above in your browser using DataLab