predictBSTFA: Estimate/predict values of the time series at a specific...

View source: R/posterior_inference.R

predictBSTFAR Documentation

Estimate/predict values of the time series at a specific location.

Description

Estimate/predict values of the time series at a specific location.

Usage

predictBSTFA(
  out,
  location = NULL,
  type = "mean",
  ci.level = c(0.025, 0.975),
  new_x = NULL,
  pred.int = FALSE
)

Arguments

out

Output from BSTFA or BSTFAfull.

location

Either a single integer indicating the location in the data set to provide predictions or a vector of length 2 providing the longitude and latitude of the new location. If location=NULL (default), the function will return predictions for all in-sample locations.

type

One of all, mean (default), median, ub, or lb indicating which summary statistic of the predicted values to return.

ci.level

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

new_x

If the original model included covariates x, include the same covariates for prediction location.

pred.int

Logical scalar indicating whether to include additional uncertainty for posterior predictive intervals (TRUE) or not (FALSE; default – intervals represent posterior probabilities around the mean of location).

Value

A matrix or vector of estimated/predicted values for location.

Author(s)

Candace Berrett and Adam Simpson

Examples

data(out.sm)
attach(out.sm)
loc1means <- predictBSTFA(out.sm, location=1, pred.int=FALSE)

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