logratioVariogram: Empirical variograms for compositions

View source: R/Geostat.R

logratioVariogramR Documentation

Empirical variograms for compositions

Description

Computes the matrix of logratio variograms.

Usage

  logratioVariogram(data, ...)
  
  ## S3 method for class 'acomp'
logratioVariogram(data,
                          loc,
                          maxdist=max(dist(loc))/2,
                          nbins=20,
                          dists=seq(0,maxdist,length.out=nbins+1),
                          bins=cbind(dists[-length(dists)],dists[-1]),
                          azimuth=0,
                          azimuth.tol=180,
                          comp=data,
                          ...
                          )
          

Arguments

data

an acomp compositional dataset

...

arguments for generic functionality

loc

a matrix or dataframe providing the observation locations of the compositions. Any number of dimension >= 2 is supported.

maxdist

the maximum distance to compute the variogram for.

nbins

The number of distance bins to compute the variogram for

dists

The distances seperating the bins

bins

a matrix with lower and upper limit for the distances of each bin. A pair is counted if min<h<=max. min and max are provided as columns. bins is computed from maxdist,nbins and dists. If it is provided, it is used directly.

azimuth

For directional variograms the direction, either as an azimuth angle (i.e. a single real number) for 2D datasets or a unit vector pointing of the same dimension as the locations. The angle is clockwise from North in degree.

azimuth.tol

The angular tolerance it should be below 90 if a directional variogram is intended.

comp

do not use, only provided for backwards compatibility. Use data instead

Details

The logratio-variogram is the set of variograms of each of the pairwise logratios. It can be proven that it carries the same information as a usual multivariate variogram. The great advantage is that all the funcitions have a direct interpreation and can be estimated even with (MAR) missings in the dataset.

Value

A list of class "logratioVariogram".

vg

A nbins x D x D array containing the logratio variograms

h

A nbins x D x D array containing the mean distance the value is computed on.

n

A nbins x D x D array containing the number of nonmissing pairs used for the corresponding value.

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

References

Tolosana, van den Boogaart, Pawlowsky-Glahn (2009) Estimating and modeling variograms of compositional data with occasional missing variables in R, StatGis09

Pawlowsky-Glahn, Vera and Olea, Ricardo A. (2004) Geostatistical Analysis of Compositional Data, Oxford University Press, Studies in Mathematical Geology

See Also

vgram2lrvgram, CompLinModCoReg, vgmFit

Examples

## Not run: 
data(juraset)
X <- with(juraset,cbind(X,Y))
comp <- acomp(juraset,c("Cd","Cu","Pb","Co","Cr"))
lrv <- logratioVariogram(comp,X,maxdist=1,nbins=10)
plot(lrv)

## End(Not run)

compositions documentation built on June 22, 2024, 12:15 p.m.