Learn R Programming

spMC (version 0.3.15)

getlen: Estimation of Stratum Lengths for Embedded Markov Chain

Description

The function estimates the stratum lengths for a \(d\)-D spatial embedded Markov chain for a specified direction \(\phi\).

Usage

getlen(data, coords, loc.id, direction, zero.allowed = FALSE)

Value

A list containing the following components:

length

a numerical vector with the stratum lengths along the given direction.

categories

a vector with the stratum categories.

maxcens

a vector with the maxima estimated censored lengths for each stratum.

directions

a \(d\)-D numerical vector which represents the chosen direction.

zeros

a logical values which denotes the possible presence of zero lengths.

Arguments

data

a categorical data vector of length \(n\).

coords

an \(n \times d\) matrix where each row denotes the \(d\)-D coordinates of data locations.

loc.id

a vector of \(n\) values which indicates the directional line of each location. It is usually the output of the function which_lines.

direction

a \(d\)-D numerical vector (or versor) which represents the chosen direction.

zero.allowed

a logical value which allows to return zero stratum lengths. It is FALSE by default.

Author

Luca Sartore drwolf85@gmail.com

Details

Stratum lengths are the lengths occupied by the same \(k\)-th category along lines in the direction \(\phi\).

References

Carle, S. F., Fogg, G. E. (1997) Modelling Spatial Variability with One and Multidimensional Continuous-Lag Markov Chains. Mathematical Geology, 29(7), 891-918.

Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice.

See Also

mlen, which_lines

Examples

Run this code
# \donttest{
data(ACM)
direction <- c(0,0,1)

# Compute the appertaining directional line for each location
loc.id <- which_lines(ACM[, 1:3], direction)

# Estimate stratum lengths
gl <- getlen(ACM$MAT5, ACM[, 1:3], loc.id, direction)
# }

Run the code above in your browser using DataLab