Learn R Programming

covatest (version 0.2.1)

couples-class: 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(typetest = 0, typecode = numeric())

Arguments

typetest

integer; set typetest=0 for simmetry test (default choice), typetest=1 for separability test, typetest=2 for type of non separability test, typetest=3 for the test on the product-sum class of models, typetest=4 for the test on the integrated product class of models, typetest=5 for the test on the Gneiting class of models

typecode

numeric or character; specifies the codification of the spatial points in the data frame or in the STFDF/STSDF, typically output from dataprep

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

Details

The function requires the user to set some external arguments:

  1. the number of spatial points to be analyzed

  2. the sequence of ID codes which denote the spatial points to be analyzed

  3. the number of spatial couples to be compared

  4. the couples of different spatial points

  5. the couples of positive and negative temporal lags

If some temporal lags, corresponding to some couples of spatial points, are not required for the specific test, might be set equal to zero.

Examples

Run this code
# NOT RUN {
## The function requires to set some external arguments.
# In the example regarding the simmetry test (typetest = 0),
# 12 spatial points, with ID codes: DERP016, ..., DESN049, have been selected,
# then 6 spatial couples ([DERP016, DENW065], .., [DEBY047, DESN049])
# have been formed for comparison. Moreover, 4 positive and negative temporal
# lags have been considered (i.e. +1, -1, +2, -2). Finally, no (N) temporal
# lag has been set equal to zero. Hence, for the simmetry test 24 (6*4)
# spatio-temporal comparisons have been fixed.
#
# To run the example, paste and copy the following lines
# (without the symbol '#') in the console
#
#coupl_sim <- couples(typetest = 0, typecode = character())
#12
#DERP016
#DENW065
#DENW063
#DENI019
#DENW068
#DEHE046
#DEHE051
#DETH026
#DEUB029
#DETH061
#DEBY047
#DESN049
#6
#DERP016
#DENW065
#DENW063
#DENI019
#DENW068
#DEHE046
#DEHE051
#DETH026
#DEUB029
#DETH061
#DEBY047
#DESN049
#4
#1
#-1
#2
#-2
#N
# }

Run the code above in your browser using DataLab