RFlinearpart: Linear part of 'RMmodel'

Description Usage Arguments Value Note See Also Examples

View source: R/rf.R

Description

RFlinearpart returns the linear part of a model

Usage

1
2
RFlinearpart(model, x, y = NULL, z = NULL, T = NULL, grid=NULL,
                data, params, distances, dim, set=0, ...)

Arguments

model,params \argModel
x \argX
y,z \argYz
T \argT
grid \argGrid
distances,dim \argDistances
data \argData
set

integer. See section Value for details.

... \argDots

Value

RFlinearpart 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.

Note

In the linear part of the model specification the parameters that are NA must be the first model part. I.e. NA * sin(R.p(new="isotropic")) + NA + R.p(new="isotropic") is OK, but not sin(R.p(new="isotropic")) * NA + NA + R.p(new="isotropic")

See Also

Bayesian, RMmodel, RFsimulate, RFlikelihood.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again


x <- seq(0, pi, len=10)
trend <- 2 * sin(R.p(new="isotropic")) + 3
model <- RMexp(var=2, scale=1) + trend
print(RFlinearpart(model, x=x))  ## only a deterministic part

trend <- NA * sin(R.p(new="isotropic")) + NA + R.p(new="isotropic") / pi
model <- RMexp(var=NA, scale=NA) + trend
print(RFlinearpart(model, x=x))

RandomFields documentation built on Feb. 6, 2020, 5:13 p.m.