svarmap: Compute the variogram map for a genetic dataset

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function computes the variogram map for a genetic dataset and returns a map in the form of an object of class SpatialPixelsDataFrame.

Usage

1
svarmap(X, cutoff, width)

Arguments

X

a ggene object.

cutoff

a numerical value indicating the separation distance up to which pairs of individuals are included in semivariance estimates. Default set to the length of the diagonal of the box spanning the data divided by three.

width

a numercial value indicating the width of distance intervals into which individuals are grouped for semivariance estimates.

Details

Variogram maps are also referred to as 'variogram surface' (Isaaks and Srivastava, 1989 p. 149). The method is an effective way to search for anisotropy axes. The tolerance on h, the separating vector, is defined in a rectangular coordinate system. Type vignette("ggene_introduction") for details and examples. svarmap relies on the function variogram from the package gstat.

Value

map

A SpatialPixelsDataFrame object [package sp]

.

Author(s)

Jean-Pierre Rossi <ggene.package@gmail.com>

References

Isaaks, E. H. and R. M. Srivastava 1989. Applied geostatistics, Oxford University Press.

See Also

svariog

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
data(aniso)

map <- svarmap(X=aniso,cutoff=20, width=1)
plot(map)
# a very clear anisotropy can be seen along the 45 degrees direction

# compute omnidirectional variogram and the directional variogram in the 45 degrees direction 
# for comparison
va <- svariog(X=aniso, plot=FALSE)
d45_225 <- svariog(X=aniso,direction=45, tolerance=22.5,  unit.angle="degrees")

# plot variograms
plot(va$svario$u, va$svario$v, type="b", ylim=range(c(va$svario$v, d45_225$svario$v)),
	xlab="distance", ylab="semivariance", lty=2)
points(d45_225$svario$u, d45_225$svario$v, type="b", col="red", lty=2)
legend("bottomright", legend=c("omnidirectional", expression(45 * degree)), lty=c(2,2,2,2,2,2), 
       col=c("black", "red"), pch=1, bty="n")

## Not run: 
data(crypho)
map <- svarmap(X=crypho,cutoff=500, width=25)
plot(map)
# changing the threshold value i.e. only values computed from a number 
#	of data pairs >= threshold values are shown
plot(map, threshold = 50)

# changing the width
map <- svarmap(X=crypho,cutoff=500, width=20)
plot(map)

map <- svarmap(X=crypho,cutoff=500, width=40)
plot(map)

# changing cutoff
map <- svarmap(X=crypho, cutoff=250, width=20)
plot(map)

map <- svarmap(X=crypho, cutoff=500, width=20)
plot(map)
plot(map, threshold = 30)

## End(Not run)

ggene documentation built on May 2, 2019, 5:54 p.m.