cv_mspe | R Documentation |
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.
cv_mspe(y, st, gt = NULL, gs = NULL)
y |
A vector of length |
st |
An |
gt |
A sequence of temporal kernel bandwidth |
gs |
A sequence of spatial kernel bandwidth |
bandwidth |
A matrix containing all the bandwidths
( |
mspe |
The mean squared prediction errors for all the bandwidths provided by users. |
bandwidth.opt |
The bandwidths |
mspe.opt |
The minimal mean squared prediction error. |
Kai Yang kayang@mcw.edu and Peihua Qiu
Yang, K. and Qiu, P. (2019). Nonparametric Estimation of the Spatio-Temporal Covariance Structure. Statistics in Medicine, 38, 4555-4565.
library(SpTe2M)
data(sim_dat)
y <- sim_dat$y; st <- sim_dat$st
gt <- seq(0.3,0.4,0.1); gs <- seq(0.3,0.4,0.1)
ids <- 1:500; y.sub <- y[ids]; st.sub <- st[ids,]
mspe <- cv_mspe(y.sub,st.sub,gt,gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.