Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RPnugget

Method to simulate the Nugget effect


Description

Method to simulate the Nugget effect. (Only for advanced users)

Usage

RPnugget(phi, boxcox, tol, vdim)

Arguments

phi

object of class RMmodel; specifies the covariance model to be simulated. The only possible model for phi is RMnugget.

boxcox

the one or two parameters of the box cox transformation. If not given, the globally defined parameters are used. See RFboxcox for details.

tol

points at a distance less than or equal to nugget.tol are considered as being identical. This strategy applies to the simulation method and the covariance function itself. Hence, the covariance function is only positive definite if nugget.tol=0.0. However, if the anisotropy matrix does not have full rank and nugget.tol=0.0, then the simulations are likely to be odd. The value of nugget.tol should be of order 1e-15.

Default: 0.0

vdim

positive integer; the model is treated vdim-variate, vdim=1 (default) corresponds to a univariate random field. Mostly, the value of vdim is set automatically.

Default is that it takes the value of the submodel phi.

Details

General

This method only allows RMnugget as a submodel.

Anisotropy

The method also allows for zonal nugget effects. Only there the argument tol becomes important. For the zonal nugget effect, the anisotropy matrix Aniso should be given in RMnugget. There, only the kernel of the matrix is important.

Points close together

The locations at a distance less than or equal to the RFoptions nugget.tol are considered as being identical. This strategy applies to the simulation method and the covariance function itself. Hence, the covariance function is only positive definite if nugget.tol=0.0. However, if the anisotropy matrix does not have full rank and nugget.tol=0.0, then the simulations are likely to be odd. The value of nugget.tol should be of order 1e-15.

Repeated measurements

Measurement errors are mathematically not distinguishable from spatial nugget effects as long as measurements are not repeated at the very same space-time location. So there is no need to distinguish the spatial nugget effect from a measurement error. This is the default, see allow_duplicated_locations in RFoptions.

In case several measurement have been taken in single space-time locations, measurement errors can be separated from spatial noise. In this case RMnugget() models the measurement error (which corresponds to a non-stationary model in an abstract space) by default and the measurement error model cannot be extended beyond the given locations. On the other hand RMnugget(Ansio=something) and RMnugget(proj=something) model the spatial nugget effect (with and without zonal anisotropy in case Aniso has low and full rank respectively).

Role of RPnugget

Even for advanced users, there is no need to call RPnugget directly, as this is done internally when the RMnugget is involved in the covariance model.

Value

RPnugget returns an object of class RMmodel.

Author(s)

References

  • Schlather, M. (1999) An introduction to positive definite functions and to unconditional simulation of random fields. Technical report ST 99-10, Dept. of Maths and Statistics, Lancaster University.

See Also

Examples

RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again


x <- y <- 1:2
xy <- as.matrix(expand.grid(x, y)) ## we get 4 locations
## Standard use of the nugget effect
model <- RMnugget(var = 100)
RFcovmatrix(model, x=xy)
as.vector(RFsimulate(model, x=x, y=x, tol=1e-10))

## zonal nugget effect, which is not along the axes
model <- RMnugget(Aniso=matrix(1, nr=2, nc=2))
RFcovmatrix(model, x=xy)
as.vector(RFsimulate(model, x=x, y=x, tol=1e-10))


## All the following examples refer to repeated measurements
RFoptions(allow_duplicated_locations = TRUE) 
(xy <- rbind(xy, xy)) ## now, the 4 locations are repeated twice 

## standard situation: the nugget is interpreted as measurement error:
model <- RMnugget()
RFcovmatrix(model, x=xy)
as.matrix(RFsimulate(model, x=xy)) 

## any anisotropy matrix with full rank: spatial nugget effect
model <- RMnugget(Aniso=diag(2))
RFcovmatrix(model, x=xy)
as.matrix(RFsimulate(model, x=xy))

## anisotropy matrix with lower rank: zonal nugget effect
model <- RMnugget(Aniso=matrix(c(1, 0, 0, 0), nc=2))
RFcovmatrix(model, x=xy)
as.matrix(RFsimulate(model, x=xy))

## same as before: zonal nugget effect
model <- RMnugget(Aniso=t(c(1,0)))
RFcovmatrix(model, x=xy)
as.matrix(RFsimulate(model, x=xy))

RandomFields

Simulation and Analysis of Random Fields

v3.3.10
GPL (>= 3)
Authors
Martin Schlather [aut, cre], Alexander Malinowski [aut], Marco Oesting [aut], Daphne Boecker [aut], Kirstin Strokorb [aut], Sebastian Engelke [aut], Johannes Martini [aut], Felix Ballani [aut], Olga Moreva [aut], Jonas Auel[ctr], Peter Menck [ctr], Sebastian Gross [ctr], Ulrike Ober [ctb], Paulo Ribeiro [ctb], Brian D. Ripley [ctb], Richard Singleton [ctb], Ben Pfaff [ctb], R Core Team [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.