melem.init {RGeostats}R Documentation

Initialize a Basic Structure


Initialize a new melem-class


melem.init(ndim=2, nvar=1,, range=NA, scale=NA, sill=NA,
           param=1, order=0, flag.aniso=FALSE, aniso.rotmat=NA, aniso.angles=NA)



Type of the Basic Structure to be created. By default, this type corresponds to the Nugget Effect. The list of types available is:

  • Nugget effect

  • Exponential

  • Spherical

  • Cubic

  • Gaussian

  • Cardinal Sine

  • J-Bessel

  • K-Bessel

  • Gamma

  • Cauchy

  • Stable

  • Linear

  • Cosinus (1D)

  • Triangle (1D)

  • Cosine Exponential

  • Exp2dfact

  • Expfact

  • Reg1D (1D)

  • Pentamodel

  • Power

  • Order-1 GC

Some are restricted to 1-D case. The two last types should be discarded when building a covariance Model


Space dimension.


Number of variables.


This parameter provides the range that should be attributed to the new Basic Structure (if required). Its contents depends on the isotropy / anisotropy characteristics defined in argument 'flag.aniso'.

  • In the isotropic case, this argument corresponds to the isotropic range of the basic structure.

  • In the anisotropic case, this argument must be a vector (dimension equal to 'ndim'): the i-th element is the extension of the anisotropic ellipsoid in the i-th direction (after rotation). Otherwise an error is issued.


Theoretical range(s) of the new basic structure. If not defined (but needed for this type of basic structures), range can be defined instead.

Depending on the isotropic / anisotropic case, the argument 'scale' must be either a single value or a vector (see 'range' for details).


This parameter provides the matrix of sills that should be attributed to the new Basic Structure (if required). The dimension of the matrix is 'nvar'.


This parameter provides the third parameter that should be attributed to the new Basic Structure (if required).


Parameter giving the maximum order of the IRF which corresponds to the model defined. If mode=-1, only covariances can be entered; if mode=0, all covariances and variograms are allowed.


This parameter is used to specify that the new Basic Structure if anisotropic.


This parameter provides the rotation matrix which defines the main axes of the rotation ellipsoid. It may not be used together with argument 'aniso.angles'.


A vector giving the set of rotations. The length of this vector should be equal to 'ndim' - 1. It may not be used together with argument 'aniso.rotmat'.


The new melem-class Basic Structure.

[Package RGeostats version 11.1.2 Index]