covastatM-class | R Documentation |
A class for the sample spatio-temporal covariances for the specified spatial
and temporal lags, given in stpairs
(object of class couple
),
for the test on the type of class of models.
Depending on the type of test, the empirical variance, the sample spatial
and temporal marginal covariances are also computed
covastatM(
matdata,
pardata1,
pardata2,
stpairs,
typetest = "productSum",
beta.data = NULL
)
## S4 method for signature 'covastatM'
show(object)
matdata |
STFDF/STSDF or |
pardata1 |
integer, it represents the column in which the spatial ID is stored (if the spatio-temporal data set is given as data.frame) or the number of variables in the STFDF/STSDF (if the data are given as a STFDF/STSDF) |
pardata2 |
integer, it represents the column in which the values of the variable are stored (if the spatio-temporal data set is given as data.frame) or the slot in which the values of the variable of interest are stored (if the data are given as a STFDF/STSDF). Note that for STFDF/STSDF the argument is set, by default, equal to 1 if the number of variables is equal to 1 |
stpairs |
object of class |
typetest |
character, set |
beta.data |
vector, this argument is required only for |
object |
object of class |
If typetest = "intProduct"
(test on the integrated product class
of models) cova.h
and cova.u
are not available
If typetest = "gneiting"
(test on the Gneiting class of models),
cova.h
is not available
A message appears on the user's console if the G
vector
contains spatio-temporal negative covariances. The message returns the negative
value/values and it will help to identify the spatial and the temporal lags
involved
G
matrix, containing the spatio-temporal covariances for the specified
lags. For all tests, the sample variance and the sample spatial and temporal
marginal covariances are also computed and stored in G
cova.h
matrix, containing the sample spatial marginal covariances for the specified lags
cova.u
matrix, containing the sample temporal marginal covariances for the specified lags
f.G
array, containing the computation of specific functions of the
elements of G
, see references
B
matrix, containing the computation of the derivatives of each element
of f.G
with respect to each element of G
A
contrast matrix
beta.data
vector, containing the different values of the parameter beta,
available only for the test on the Gneiting class of model (typetest = "gneiting"
)
typetest
character, contains the code of the test to be performed
A stop occurs if the number of spatial points fixed in stpairs
(object of class couples
) is less than 2
A stop occurs if more than 75\ series, since a large number of missing values do not guarantee the reliability of the tests
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.
couples
read.STdata
# --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.mod <- c("DERP016", "DENW065", "DENW063", "DEHE046", "DEUB029",
"DETH061", "DENW068", "DETH026", "DENI051")
sp.couples.in.mod <- matrix(data = c("DERP016", "DENW065", "DENW063", "DEHE046",
"DEUB029", "DETH061", "DEHE046", "DENW063",
"DERP016", "DENW068", "DETH026", "DENI051",
"DEUB029", "DETH061", "DENI051", "DETH061",
"DERP016", "DEUB029"),
ncol = 2, byrow = TRUE)
t.couples.in.mod <- c(1, 2, 3)
couples.mod <- couples(sel.staz = sel.staz.mod, sp.couples.in =
sp.couples.in.mod, t.couples.in = t.couples.in.mod,
typetest = "productSum", typecode = character())
zero.index <- matrix(data=c(3, 7, 6, 7, 9, 7), ncol=2, byrow = TRUE)
couples.mod <- setzero(x = couples.mod, zero = FALSE, index = zero.index, value = 0)
covast.ps <- covastatM(matdata = rr_13, pardata1 = 1, pardata2 = 1,
stpairs = couples.mod, typetest = "productSum", beta.data = NULL)
### method for covastat
#1. show
covast.ps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.