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

RFboxcox

Linear part of RMmodel


Description

RFboxcox performs the Box-Cox transformation: \frac{(x+μ)^λ-1}{λ}

Usage

RFboxcox(data, boxcox, vdim = 1, inverse=FALSE, ignore.na=FALSE)

Arguments

data

matrix or list of matrices.

boxcox

the one or two parameters (λ, μ) of the box cox transformation, in the univariate case; if μ is not given, then μ is set to 0. If not given, the globally defined parameters are used, see Details. In the m-variate case boxcox should be a 2 \times m matrix. If λ =∞ then no transformation is performed.

vdim

the multivariate dimensionality of the field;

inverse

logical. Whether the inverse transformation should be performed.

ignore.na

logical. If FALSE an error message is returned if any value of boxcox is NA. Otherwise the data are returned without being transformed.

Details

The Box-Cox transfomation boxcox can be set globally through RFoptions. If it is set globally the transformation applies in the Gaussian case to RFfit, RFsimulate, RFinterpolate, RFvariogram. Always first, the Box-Cox transformation is applied to the data. Then the command is performed. The result is back-transformed before returned.

If the first value of the transformation is Inf no transformation is performed (and is identical to boxcox = c(1,0)). If boxcox has length 1, then the transformation parameter μ is set to 0, which is the standard case.

Value

RFboxcox returns a list of three components, Y, X, vdim returning the deterministic trend, the design matrix, and the multivariability, respectively. If set is positive, Y and X contain the values for the set-th set of coordinates. Else, Y and X are both lists containing the values for all the sets.

Author(s)

References

For the likelihood correction see

  • Konishi, S., and Kitagawa, G. (2008) Information criteria and statistical modeling. Springer Science & Business Media. Section 4.9.

See Also

Examples

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

data(soil)
str(soil)
soil <- RFspatialPointsDataFrame(
 coords = soil[ , c("x.coord", "y.coord")],
 data = soil[ , c("moisture", "NO3.N", "Total.N", "NH4.N", "DOC", "N20N")],
 RFparams=list(vdim=6, n=1)
)
dta <- soil["moisture"]


model <- ~1 + RMplus(RMwhittle(scale=NA, var=NA, nu=NA), RMnugget(var=NA))



## main Parameter in the Box Cox transformation to be estimated
print(fit <- RFfit(model, data=dta, boxcox=NA))

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.