trace.variog: Empirical Variograms for function-value data

Description Usage Arguments Details Value Author(s) References Examples

View source: R/trace.variog.R

Description

Computes empirical trace-variograms using the L2 norm matrix for the semivariance values. Output a variogram cloud.

Usage

1
2
  trace.variog(coords, L2norm, bin=FALSE, max.dist, uvec="default",
              breaks="default", nugget.tolerance)

Arguments

coords

an s x 2 matrix containing the coordinates of the n sites where functional data are observed.

L2norm

L2 norm among functions.

bin

logical, indicating whether the output is the binned variogram.

max.dist

a numerical value defining the maximum distance for the variogram.

uvec

a vector with values defining the centers of the bins or the number of bins. Only used when 'bin = TRUE'.

breaks

a vector with values defining the variogram binning. Only used when 'bin = TRUE'.

nugget.tolerance

a numeric value defining the shortest lag distance. Only used when 'bin = TRUE'.

Details

Binned variogram This is just a visual feature adapted from the cloud variogram and it doesn't have any relation against the fitting of the variogram model or the calculation of the predictions.

Value

An object of the class variogram which is a list with the following components:

u

a vector with distances.

v

a vector with estimated variogram values at distances given in u.

max.dist

maximum distance of the variogram.

output.type

variogram type.

Eu.d

euclidian distance array among sites.

L2norm

echoes the 'L2norm' argument.

bins.lim

limits defining the interval spanned by each bin. Only returned when 'bin = TRUE'.

nugget.tolerance

echoes the 'nugget.tolerance' argument.

Author(s)

Ramon Giraldo rgiraldoh@unal.edu.co,
Pedro Delicado pedro.delicado@upc.edu,
Jorge Mateu mateu@mat.uji.es.

References

Giraldo, R. (2009) Geostatistical Analysis of Functional Data. Ph.D. thesis. Universitat Politecnica de Catalunya.

Giraldo, R., Delicado, P. and Mateu, J. (2012) geofd: An R package for function-valued geostatistical prediction. Revista Colombiana de Estadistica. 35, 385-407.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# First example: creating a binned variogram
# okfd first example

data(maritimes.avg)
data(maritimes.coords)
data(maritimes.data)
coord.cero <- matrix(c(-64.06, 45.79),nrow=1,ncol=2)
n<-dim(maritimes.data)[1]
argvals<-seq(1,n, by=1)
okfd.res<-okfd(new.coords=coord.cero, coords=maritimes.coords,
              data=maritimes.data, nbasis=65, argvals=argvals, fix.nugget=TRUE,
              kappa=0.7)

# Calculating the empiricial trace bin variogram
new.emp.trace.vari <- trace.variog(coords=okfd.res$coords,
                      L2norm=okfd.res$emp.trace.vari$L2norm, bin=TRUE)

# The empirical trace cloud variogram is replaced with the trace bin variogram
okfd.res$emp.trace.vari <- new.emp.trace.vari

# The modified okfd result is plotted
plot(okfd.res)

geofd documentation built on Jan. 29, 2020, 5:08 p.m.