Use predict.ssnbayes() instead. It will take an observed and a prediction data frame. It requires the same number of observation/locations per day. It requires location id (locID) and points id (pid). The locID are unique for each site. The pid is unique for each observation. Missing values are allowed in the response but not in the covariates.

krig(
  object = object,
  mat_all_preds = mat_all_preds,
  nsamples = 10,
  start = 1,
  chunk_size = 50,
  obs_data = obs_data,
  pred_data = pred_data,
  net = net,
  seed = seed
)

Arguments

object

A stanfit object returned from ssnbayes

mat_all_preds

A list with the distance/weights matrices

nsamples

The number of samples to draw from the posterior distributions. (nsamples <= iter)

start

(optional) The starting location id

chunk_size

(optional) the number of locID to make prediction from

obs_data

The observed data frame

pred_data

The predicted data frame

net

(optional) Network from the SSN object

seed

(optional) A seed for reproducibility

Value

A data frame

Author

Edgar Santos-Fernandez