R/all_func.R
pred_ssnbayes.Rd
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.
pred_ssnbayes(
object = object,
path = path,
obs_data = obs_data,
pred_data = pred_data,
net = 1,
nsamples = 100,
addfunccol = "afvArea",
locID_pred = locID_pred,
chunk_size = chunk_size,
seed = seed
)
A stanfit object returned from ssnbayes
Path with the name of the SSN object
The observed data frame
The predicted data frame
(optional) Network from the SSN object
The number of samples to draw from the posterior distributions. (nsamples <= iter)
The variable used for spatial weights
(optional) the location id for the predictions. Used when the number of pred locations is large.
(optional) the number of locID to make prediction from
(optional) A seed for reproducibility
A data frame
#pred <- pred_ssnbayes(path = path,
#obs_data = clear,
#stanfit = fit_ar,
#pred_data = preds,
#net = 2,
#nsamples = 100, # number of samples to use from the posterior in the stanfit object
#addfunccol = 'afvArea') # variable used for spatial weights