setzero {covatest} | R Documentation |
setzero
Description
Through the function couples, m
spatial couples and n
temporal lags are provided, hence a set of m x n
spatio-temporal lags
are defined. If some of these lags are not required for the specific test, they
can be set equal to zero by using the setzero
method for object of class
couples
Usage
setzero(x, zero = TRUE, index = NULL, value)
## S4 method for signature 'couples'
setzero(x, zero = TRUE, index = NULL, value)
Arguments
x |
object of class |
zero |
logical, if |
index |
two column matrix. Each row of the matrix |
value |
numeric, the value to be replaced. Note that this method is reasonable to be used only to replace a value equal to zero |
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())
zero.index <- matrix(data=c(1,3,1,4,2,5,2,6), ncol=2, byrow = TRUE)
setzero(couples.sym, zero = FALSE, index = zero.index, value = 0)