covablocks-class {covatest} | R Documentation |
Class "covablocks"
Description
A class for the sample spatio-temporal covariances to be computed for each
block of data and for the selected spatial and temporal lags fixed
in stpairs
(output from couples
). Depending on the type of
test the empirical variance, the sample spatial and temporal marginal
covariances for each block of data are also computed. Moreover, the sample
covariances between the spatio-temporal covariances at the specified spatial
and temporal lags are determined.
Usage
covablocks(stblocks, stpairs, typetest = "sym")
## S4 method for signature 'covablocks'
show(object)
Arguments
stblocks |
object of class |
stpairs |
object of class |
typetest |
character, set |
object |
object of class |
Details
If
typetest
is equal to"sym"
(symmetry test) or"intProduct"
(test on the integrated product class of models)mat.cova.h
andmat.cova.u
are not availableIf
typetest
is equal to"gneiting"
(test on the Gneiting class of models)mat.cova.h
is not availableIf temporal lags in
stpairs
are not consistent with block length (lb
) instblocks
an error message will be returnedIf the proportion between the maximum temporal lag in
stpairs
and the block length (lb
) instblocks
is greater than 0.25 a warning message will be returned since the covariance estimation might not be reliable
Slots
mat.cova
matrix of sample spatio-temporal covariances for each block, computed for the spatial and temporal lags given in
stpairs
(object of classcouples
)mat.cova.h
matrix of sample spatial marginal covariances for the specified lags
mat.cova.u
matrix of sample temporal marginal covariances for the specified lags
mat.cova.cova
matrix of sample covariances between space-time covariances for each block, computed for the spatial and temporal lags given in
stpairs
(object of classcouples
)typetest
character, contains the code of the test to be performed
References
Cappello, C., De Iaco, S., Posa, D., 2018, Testing the type of non-separability and some classes of space-time covariance function models. Stochastic Environmental Research and Risk Assessment, 32 17–35
Cappello, C., De Iaco, S., Posa, D., 2020, covatest: An R Package for Selecting a Class of Space-Time Covariance Functions. Journal of Statistical Software, 94(1) 1–42.
De Iaco, S., Palma, M., Posa, D., 2016. A general procedure for selecting a class of fully symmetric space-time covariance functions. Environmentrics, 27(4) 212–224.
Li, B., Genton, M.G., Sherman, M., 2007, A nonparametric assessment of properties of spacetime covariance functions. Journal of the American Statistical Association, 102 736–744.
See Also
Examples
# --start define the STFDF rr_13-- #
library(sp)
library(spacetime)
#library(gstat)
data(air)
ls()
if (!exists("rural")) rural = STFDF(stations, dates, data.frame(PM10 =
as.vector(air)))
rr = rural[,"2005::2010"]
unsel = which(apply(as(rr, "xts"), 2, function(x) all(is.na(x))))
r5to10 = rr[-unsel,]
rr_13 <- r5to10[c("DEHE046","DESN049","DETH026","DENW063","DETH061","DEBY047",
"DENW065","DEUB029","DENW068","DENI019","DEHE051","DERP016","DENI051"),
"2005::2006"]
# --end define the STFDF rr_13-- #
sel.staz.sym <- c("DERP016", "DENW065", "DEHE051", "DETH026", "DENW063", "DENI019",
"DENW068", "DEHE046", "DEUB029", "DEBY047", "DETH061", "DESN049")
sp.couples.in.sym <- matrix(data = c("DERP016", "DENW065", "DEHE051", "DETH026",
"DENW063", "DENI019", "DENW068", "DEHE046", "DEUB029", "DEBY047", "DETH061", "DESN049"),
ncol = 2, byrow = TRUE)
t.couples.in.sym <- c(1, 2)
couples.sym <- couples(sel.staz = sel.staz.sym, sp.couples.in = sp.couples.in.sym,
t.couples.in = t.couples.in.sym, typetest = "sym", typecode = character())
block.sym <- blocks(lb = 40, ls = 10, matdata = rr_13, pardata1 = 1, pardata2 = 1,
stpairs = couples.sym)
covabl.sym <- covablocks(stblocks = block.sym, stpairs = couples.sym, typetest = "sym")
### method for covablock
#1. show
covabl.sym