tscsRegression3D: The First Step of TSCS for 3D Rectangular Grid System -...

Description Usage Arguments Details Value See Also Examples

View source: R/namespace.R View source: R/tscsRegression3D.R

Description

To implement TSCS spatial interpolation for a spatial domain that is a 3D rectangular grid system, the first step is obtaining regression coefficient matrix, which can be done by function tscsRegression3D. It is the prerequisite of TSCS interpolation process because the 'matrix' derived from historical spatio-temporal data is the initial value of the second step - estimating missing observations.

Usage

1
tscsRegression3D(data, h1, h2, v, alpha = 0.05)

Arguments

data

data frame; should contain these variables in order: X coordinate, Y coordinate, Z coordinate and observations as time goes on. That is to say, each row should include X, Y and Z coordinate first, and then a time series. This is the historical spatio-temporal data that you intend to analyze as the basis for interpolation later on in tscsEstimate3D.

h1

numeric; side length of the unit cubic grid in X coordinate direction (horizontal).

h2

numeric; side length of the unit cubic grid in Y coordinate direction (horizontal).

v

numeric; side length of the unit cubic grid in Z coordinate direction (vertical).

alpha

numeric; specify the significance level for ADF test, to test if the time series of a group of spatial locations are cointegrated. (default: 0.05)

Details

Value

A list of 2 is returned, including:

coef_matrix

data frame; regression coefficient matrix to be used as input parameter of function tscsEstimate in the second step of TSCS interpolation.

percentage

numeric; percentage of cointegrated relationships, a measurement of the degree it satisfies the assumption of cointegrated system. It is highly affected by parameter alpha, the significance level you have set. Explicitly, smaller alpha results in smaller percentage.

See Also

tscsEstimate3D, tscsRegression, plot3D_dif

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 

## TSCS spatial interpolation procedure:

basis <- tscsRegression3D(data = data, h1 = 3.75, h2 = 2.5, v = 5, alpha = 0.01);
basis$percentage
est <- tscsEstimate3D(matrix = basis$coef_matrix, newdata = newdata, h1 = 3.75, h2 = 2.5, v = 5);
str(est)

## comparison of estimates and true values:

plot_compare(est = est$estimate[,4], true = true)
index <- appraisal_index(est = est$estimate[,4], true = true);
index

## data visualization:

plot3D_dif(data = data[,1:3], h1 = 3.75, h2 = 2.5, v = 5)
plot3D_NA(newdata = newdata)
plot3D_map(newdata = newdata)

## End(Not run)

TSCS documentation built on May 2, 2019, 4:04 p.m.

Related to tscsRegression3D in TSCS...