Learn R Programming

geospt (version 1.0-0)

network.design: Generating ASEPE associated with a conditioned network design

Description

Generates a sampling network for a given sampling distance or type (configuration), and calculates the average kriging standard error prediction errors (ASEPE) associated with the spatial configuration for a given predefined variogram

Usage

network.design(formula, vgm.model, xmin, xmax, ymin, ymax, npoint.x, npoint.y, 
npoints, boundary=NULL, type, ...)

Arguments

Value

returns the ASEPE value associated with the spatial distribution of points and the kriging method used.

References

Fibonacci sampling: Alvaro Gonzalez, 2010. Measurement of Areas on a Sphere Using Fibonacci and Latitude-Longitude Lattices. Mathematical Geosciences 42(1), p. 49-64

See Also

krige, krige.cv, spsample, point.in.polygon, sample

Examples

Run this code
### regular grid 10x10
vgm1 <- vgm(112.33, "Sph", 4.3441,0)
# network: ordinary kriging (without boundary)
net1.ok <- network.design(z~1,vgm1, xmin=0,xmax=10, ymin=0, ymax=10, npoint.x=10, 
    npoint.y=10, nmax=6)
net2.ok <- network.design(z~1,vgm1, xmin=0,xmax=10, ymin=0, ymax=10, npoint.x=20, 
    npoint.y=20, nmax=6)
# it's worth noting that the variograms are different in each kriging,  
# but for this example, the same variogram is used just to show how the function works

# network: simple kriging (without boundary)

net1.sk <- network.design(z~1,vgm1, xmin=0,xmax=10, ymin=0, ymax=10, npoint.x=10, 
    npoint.y=10, nmax=6, beta=2)
net2.sk <- network.design(z~1,vgm1, xmin=0,xmax=10, ymin=0, ymax=10, npoint.x=20, 
    npoint.y=20, nmax=6, beta=2)
# network: universal kriging, second order trend (without boundary)
net1.uk <- network.design(z~x + y + x*y + I(x^2)+I(y^2),vgm1, xmin=0,xmax=10, ymin=0, 
    ymax=10, npoint.x=10, npoint.y=10, nmax=8)
net2.uk <- network.design(z~x + y + x*y + I(x^2)+I(y^2),vgm1, xmin=0,xmax=10, ymin=0, 
    ymax=10, npoint.x=20, npoint.y=20, nmax=8)


# Creating the grid with the prediction and plotting points
library(geoR)
data(ca20)
Sr1 <- Polygon(ca20$borders)
Srs1 = Polygons(list(Sr1), "s1")
Polygon = SpatialPolygons(list(Srs1))
vgm2 <- vgm(112.33, "Sph", 15000,0)

# network: ordinary kriging (with boundary)
netb1.ok<- network.design(z~1, vgm2, npoints=50, boundary=Polygon, nmax=6)
netb2.ok<- network.design(z~1, vgm2, npoints=100, boundary=Polygon, nmax=6)
# network: simple kriging (with boundary)
netb1.sk <- network.design(z~1, vgm2, npoints=50, boundary=Polygon, nmax=6, beta=2)
netb2.sk <- network.design(z~1, vgm2, npoints=100, boundary=Polygon, nmax=6, beta=2)
# network: universal kriging, second order trend (with boundary)
netb1.uk <- network.design(z~x + y + x*y + I(x^2)+I(y^2), vgm2, npoints=50, 
    boundary=Polygon, nmax=8)
netb2.uk <- network.design(z~x + y + x*y + I(x^2)+I(y^2), vgm2, npoints=100, 
    boundary=Polygon, nmax=8)

Run the code above in your browser using DataLab