Learn R Programming

covatest (version 0.2.1)

blocks-class: Class "blocks"

Description

A class for overlapped blocks of the time series associated with the given spatial points specified in couples. Thus, it is necessary to execute '>couples first and then '>blocks

Usage

blocks(lb, ls, matdata, stpairs)

Arguments

lb

integer, length of each block. The number of terms in each block must be greater than 5 and smaller than the quarter part of the length of each time series

ls

integer, number of overlapped data between two consecutive blocks. The number of overlapped terms between two consecutive blocks must in the interval [0,lb/2]

matdata

STFDF/STSDF or data frame; which contains the coordinates of the spatial points, the identification code of the spatial points, the indentification code of the temporal points and the values of the variable, typically output from dataprep

stpairs

object of class couples, containing the spatial points and the corresponding temporal lags to be analyzed

Slots

mat.block

matrix of dimension (lb x overall number of blocks); the columns of this matrix are associated with the different blocks, of length equal to lb, that can be extracted from the time series related to the selected spatial points defined in stpairs@sel.staz

array.block

array of dimension (lb x number of blocks for each selected spatial points x number of spatial points). In each table of this array, the overlapped blocks for each spatial location are available

Details

The function requires the user to set some external arguments. In particular, if the spatio-temporal data are given as a data frame it is necessary to specify

  • the column in which the spatial ID is stored

  • the column in which the values of the variable are stored.

On the other hand, if the data are given as a STFDF/STSDF it is necessary to specify

  • the number of variables in the STFDF/STSDF

  • the slot in which the values of the variable of interest are stored (only if more than one variable is stored in the STFDF/STSDF).

Moreover, a message informs the user of the number of blocks computed. The user can choose to continue or not with this number of blocks.

References

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.

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.

Cappello, C., De Iaco, S., Posa, D., 2016, Testing the type of non-separability and some classes of covariance models for space-time data. (submitted)

See Also

couples

dataprep

Examples

Run this code
# NOT RUN {
# In the example regarding the simmetry test (typetest = 0), the length of
# each block is equal to 40 (lb=40) and the number of overlapped data between
# two consecutive blocks is equal to 10 (ls=10). In this way, 24 blocks, for
# each time series of 730 data have been obtained [24 = (730 - 1) / (40 - 10)].
# This number of blocks is consistent with respect the number of comparisons
# (24) defined in couples. Moreover, it is necessary to specify some external
# arguments: the number of variables in the analyzed STFDF (rr_13) and to
# confirm whether or not one wants to proceed
# with the number of blocks obtained with the aforementioned combination of
# lb and ls
#
# To run the example, paste and copy the following lines
# (without the symbol '#') in the console
#
# coupl_sim <- couples(typetest = 0, typecode = character())
# blocks_sim <- blocks(lb = 40, ls = 10, matdata = rr_13, stpairs = coupl_sim)
# 1
# Y

# }

Run the code above in your browser using DataLab