couples-class {covatest} | R Documentation |
Class "couples"
Description
A class for spatial points and the corresponding temporal lags to be analyzed in order to test some covariance properties and some well known classes of space-time covariance functions models
Usage
couples(
sel.staz,
sp.couples.in,
t.couples.in,
typetest = "sym",
typecode = numeric()
)
## S4 method for signature 'couples'
show(object)
## S4 method for signature 'couples'
x[i, by.row = FALSE, drop = FALSE]
## S4 method for signature 'couples'
summary(object)
Arguments
sel.staz |
vector, the sequence of ID codes which denote the spatial points to be analyzed |
sp.couples.in |
two-column matrix: rows corresponding to the couples
of different spatial points, chosen among the ones fixed in |
t.couples.in |
vector of only positive (negative) temporal lags to be
analyzed. The corresponding negative (positive) temporal lags are included
authomatically for |
typetest |
character, set |
typecode |
type of object, i.e. numeric() or character(), specifies the
type of codification of the spatial points in the |
object |
object of class |
x |
object of class |
i |
index specifying rows or columns of the slot |
by.row |
logical, if |
drop |
logical, the argument is set, by default, equal to |
Details
It is important to point out that:
both positive and negative temporal lags are automatically considered in the slot
@couples.st
and@tl.couples
for symmetry test (typetest = "sym"
), separability test (typetest = "sep"
) and type of non separability tests (typetest = "tnSep"
). If the symmetry hyphotesis has not been rejected, only positive temporal lags might be considered for the test on separability and type of non separability (typetest = "sep"
andtypetest = "tnSep"
), hence the specificsetzero
method must be used to set the negative temporal lags equal to zerofor
typetest = "tnSep"
the temporal lags should be chosen according to the results of the sample non separability ratios, plotted through a boxplot classified for temporal lags (see sepindex for more details)for model tests (
typetest
equal to"productSum"
,"intProduct"
and"gneiting"
), the number of analyzed spatial points must be used to create at least 3 spatial couples or multiple of 3, such that each triplet satisfies the condition \[||\mathbf{h}_{1}||^{2\gamma} - ||\mathbf{h}_{2}||^{2\gamma} = ||\mathbf{h}_{2}||^{2\gamma}-||\mathbf{h}_{3}||^{2\gamma}\] where \(\gamma \in ]0,1]\) only fortypetest = "intProduct"
and"gneiting"
. The number of positive temporal lags must be at least 3, or multiple of 3, too. The condition \[u_{1}^{2\alpha}-u_{2}^{2\alpha}=u_{2}^{2\alpha}-u_{3}^{2\alpha}\] where \(\alpha \in ]0,1]\) must be satisfied for each triplet (only fortypetest = "intProduct"
and"gneiting"
), as clarified in Cappello et al., 2018. The values of \(\gamma\) and \(\alpha\) are usually fixed equal to 0.5 or 1 according that the behavior near the origin of the spatial and temporal marginal covariograms is linear or quadratic, respectively. Note that for each spatial triplet and each temporal triplet, 6 contrasts can be defined. However, fortypetest = "intProduct"
(test on the integrated model) the user has to set arbitrarily one temporal lag equal to zero for each spatial triplet in order to delete redundant contrasts, through the specificsetzero
method
Slots
couples.st
matrix, in which the first two columns contain the couples of spatial points (denoted with order numbers) to be analyzed and the other columns the temporal lags associated with each spatial couples
sel.staz
numeric or character, contains the ID codes of the selected spatial points
sp.couples
data.frame, contains the couples of order numbers associated with the spatial points to be analyzed and the couples of the ID codes
tl.couples
numeric, contains the temporal lags associated to the couples of the selected spatial points
typetest
character; contains the code of the test to be performed
Note
Errors occur if
some spatial points, given in the sequence at the beginning of the function, have not been used to generate the couples of spatial points
there is at least one spatial couple with no specification of temporal lags
no temporal lags have been specified
the number of spatial points fixed in
sel.staz
is less than 2the construction of the
sp.couples.in
is not consistent with the test to be performed
References
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.
See Also
Examples
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())
### methods for couples
#1. show
couples.sym
#2. [ extract
couples.sym[3, by.row = FALSE]
couples.sym[3, by.row = TRUE]
#3. summary
summary(couples.sym)