Learn R Programming

ltsk (version 1.0.1)

ltsk: Local time and space kriging

Description

This function implements spatiotemporal neighbor search, automatic variogram estimation using the product-sum model and ordinary Kriging at multiple query locations using the observed data.

Usage

ltsk(query, obs, th, xcoord = "x", ycoord = "y", tcoord = "t", 
	zcoord = "z", vth = NULL, vlen = NULL, llim = c(3, 3), 
	verbose = T, Large = 2000, nproc = NULL)

Arguments

query
data frame containing query spatiotemporal locations
obs
data frame containing spatiotemporal locations and observed data
th
a priori chosen distance and time thresholds for neighbor search
xcoord
field name for x coordinate in both query and obs
ycoord
field name for y coordinate in both query and obs
tcoord
field name for time coordinate in both query and obs
zcoord
field name for data in obs
vth
thersholds for local spatiotemporal varigoram (default 75% max lag difference)
vlen
numbers of bins for local spatiotemporal varigram(default,space 15, temporal for each day)
llim
lower limits for number of data points to calculate Kriging (default 3 spatial, 3 temporal neighbors)
verbose
boolean whether print details information
Large
upper limit of neighbor points, beyond which subsampling was done
nproc
number of cores to use (defautl single core)

Value

  • Kriging mean and standard error and quality flags. ll{ 0 valid prediction 1 not enough temporal neighbours (less than 3 by default) 2 not enough spatial neighbours (less than 3 by default) 4 not enough neighbours (less than 5 observed data) }

Details

This function generalizes the local Kriging method to large spatiotemporal data. For each query point, a local spatiotemporal neighborhood of observed data was identified. Local spatiotemporal variogram was estiamted for ordinary Kriing.

Details on the development of spatiotemporal neighborhood through sub-sampling can be found in the local spatial Kriging documents. The product-sum approach wass used to model the local variogram. Details on estimating the variogram model within each neighborhood can be found in Iaco et. al 2001.

References

Iaco, S. De & Myers, D. E. & Posa, D., 2001. "Space-time analysis using a general product-sum model," Statistics & Probability Letters, Elsevier, vol. 52(1), pages 21-28, March.

Kumar,N., Liang, D., Chu, A., Abrams, T., forthcoming. "Satellite based PM concentrations and its application to COPD in Cleveland", Journal of Exposure Science and Environmental Epidemiology.

Examples

Run this code
## load the data
data(ex)
data(epa_cl)
## apply log transformation
obs[,'pr_pm25'] = log(obs[,'pr_pm25'])
## run kriging
system.time(out <- ltsk(ex2.query[1:2,],obs,c(0.10,10),zcoord='pr_pm25'))
## simple parallel kriging
system.time(out <- ltsk(ex2.query[1:2,],obs,c(0.10,10),zcoord='pr_pm25',nproc=2))
## output
table(out$flag)

Run the code above in your browser using DataLab