cv_mspe: Cross-validation mean squared prediction error
Description
The spatio-temporal covariance function is estimated by the
weighted moment estimation method in Yang and Qiu (2019). The function
cv_mspe is developed to select the bandwidths (gt,gs) used
in the estimation of the spatio-temporal covariance function.
Usage
cv_mspe(y, st, gt = NULL, gs = NULL)
Value
bandwidth
A matrix containing all the bandwidths
(gt, gs) provided by users.
mspe
The mean squared prediction errors for all the bandwidths
provided by users.
bandwidth.opt
The bandwidths (gt, gs) that minimizes the
mean squared prediction error.
mspe.opt
The minimal mean squared prediction error.
Arguments
y
A vector of length \(N\) containing data of the observed response
\(y(t,s)\), where \(N\) is the total number of observations over space
and time.
st
An \(N\times 3\) matrix specifying the spatial locations
(i.e., (\(s_u\),\(s_v\))) and times (i.e., \(t\)) for all the
observations in y. The three columns of st correspond to
\(s_u\), \(s_v\) and \(t\), respectively.
gt
A sequence of temporal kernel bandwidth gt provided by users;
default is NULL, and cv_mspe will choose its own sequence
if gt=NULL.
gs
A sequence of spatial kernel bandwidth gs provided by users;
default is NULL, and cv_mspe will choose its own sequence
if gs=NULL.