covmodel: Create isotropic covariance model

Description Usage Arguments Value Note Author(s) Examples

View source: R/covmodlist.R

Description

Function to generate isotropic covariance models, or add an isotropic covariance model to an existing isotropic model

Usage

1
2
3
4
5
covmodel(modelname, mev, nugget,variance, scale,
parameter, add.covmodel)

## S3 method for class 'covmodel'
print(x, ...)

Arguments

modelname

character vector, name of the covariance model, e.g. "exponential", "spherical", "gauss". A call of covmodel() without a function argument displays a table with all available models and their parameters. Check the CovarianceFct in the RandomFields package for detailed information about the covariance functions.

mev

numeric value, variance of the measurement error

nugget

numeric value, variance of microstructure white noise process (range smaller than the data support)

variance

numeric value, partial sill of the variogram model

scale

numeric value, scale parameter of the variogram model

parameter

numeric vector of covariance parameters, missing for some model like nugget, spherical or gauss or

add.covmodel

object of the class covmodel that is added to the covariance model defined by modelname (see examples)

x

a covariance model generated by covmodel

...

further printing arguments

Value

an object of the class covmodel that define a covariance model.

Note

The names and parametrisation of the covariance model originate from the CovarianceFct in the RandomFields package. The values of the arguments mev, nugget, variance and scale are by default = 0.

Please, be aware that you only can generate spatial isotropic covariance models, Time-Space models or so called (hypermodels) are not implemented.

Author(s)

Christoph Hofer christoph.hofer@alumni.ethz.ch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# table with all available covariance models and their
# parameters
covmodel()

# exponential model without a measurement error and without a nugget,
# partial sill = 10, scale  parameter = 15
covmodel(modelname = "exponential", variance = 10, scale = 15)

# exponential model with a measurement error ( mev = 0.5) and a
# nugget (nugget = 2.1), exponential partial  sill (variance = 10)
# and scale parameter = 15
covmodel(modelname = "exponential", mev  = 0.5, nugget = 2.1,
variance = 10, scale = 15)

## End(Not run)

Example output

Loading required package: sp
Loading required package: spatialCovariance

The constrainedKriging package provides functions for efficient 
computations of nonlinear spatial predictions with local change of support.


                                            
                                            
                                            
   implemented covariance functions inside constrainedKriging 
   -------------------------------------------------------
   covariance model   | parameter for 2D 
   -------------------------------------------------------
   *   bessel         | a > 0 
   *   cauchy         | a > 0 
   *   cauchytbm      | a = (0,2], b > 0 
   *   circular       | a = (0,2], b > 0 
   *   constant       | NULL 
   *   cubic          | NULL 
   *   dampedcosine   | a > 1 
   *   exponential    | NULL 
   *   gauss          | NULL 
   *   spherical      | NULL 
   *   gencauchy      | a = (0,2], b > 0 
   *   gengneiting    | a = 1, b >= 2.5 , a = 2, b >= 3.5, a = 3, b >= 4.5 
   *   gneiting       | NULL 
   *   hyperbolic     | a,b,c > 0 | a,c,> 0, b = 0 | a >= 0, c > 0, b < 0 
   *   lgd1           | a in (0,0.5], b > 0 
   *   nugget         | NULL 
   *   penta          | NULL 
   *   power          | a > 1.5 
   *   wave           | NULL 
   *   qexponential   | a in [0,1] 
   *   matern         | a > 0 
   *   whittle        | a > 0 
   *   stable         | a in (0,2] 
   *   gencauchy      | a in (0,2], b > 0 
   -------------------------------------------------------
      For more details please check the help page of the  
      function CovarianceFct in the RandomFields package.
   -------------------------------------------------------
                                            
                                            
                                            
  model name    psill scale
1 mev           0     0    
2 exponential   10    15   
  model name    psill scale
1 mev           0.5   0    
2 nugget        2.1   0    
3 exponential   10    15   

constrainedKriging documentation built on May 2, 2019, 4:51 a.m.