spte_covest {SpTe2M} | R Documentation |
Estimate the spatio-temporal covariance function
Description
The function spte_covest
is developed to estimate the spatio-temporal
covariance V(t,t';s,s')=\mbox{Cov}(y(t,s),y(t',s'))
by the weighted
moment estimation procedure (cf., Yang and Qiu 2019). It should be noted that
the estimated covariance from spte_covest
may not be positive
semidefinite and thus it may not be a legitimate covariance function. In such
cases, the projection-based modification needs to be used to make it positive
semidefinite (cf., Yang and Qiu 2019).
Usage
spte_covest(y, st, gt = NULL, gs = NULL, stE1 = NULL, stE2 = NULL)
Arguments
y |
A vector of length |
st |
An |
gt |
The temporal kernel bandwidth |
gs |
The spatial kernel bandwidth |
stE1 |
An |
stE2 |
An |
Value
stE1 |
Same as the one in the arguments. |
stE2 |
Same as the one in the arguments. |
bandwidth |
The bandwidths |
covhat |
An |
Author(s)
Kai Yang kayang@mcw.edu and Peihua Qiu
References
Yang, K. and Qiu, P. (2019). Nonparametric Estimation of the Spatio-Temporal Covariance Structure. Statistics in Medicine, 38, 4555-4565.
Examples
library(SpTe2M)
data(sim_dat)
y <- sim_dat$y; st <- sim_dat$st
ids <- 1:500; y.sub <- y[ids]; st.sub <- st[ids,]
cov.est <- spte_covest(y.sub,st.sub)