Learn R Programming

RandomFields (version 3.0.62)

RMcovariate: Model for covariates

Description

The model makes covariates available

Usage

RMcovariate(c, x, y=NULL, z=NULL, T=NULL, grid, factor, var)
RMcovariateIntern(norm, c, x, T, grid, factor)

Arguments

c
vector or matrix of data
x,y,z,T,grid
optional. The usual arguments as in RFsimulate to define the locations where the covariates are given
factor
vector or matrix of numerical values. The length of the vector must match the given number of locations.
var
variance, i.e. factor multiplied to the data, which can be estimated through ML
norm
optional model that gives the norm between locations

Value

Details

The functions interpolates (nearest neighbour) between the values.

RMcovariate_intern should not be used by the user.

See Also

RMmodel,

Examples

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

z <- 0.2 + (1:10)
RFfctn(RMcovariate(z, 1:10), c(2, 2.1, 2.5, 3))

RFfctn(RMcovariate(z), 1:10)

FinalizeExample()

Run the code above in your browser using DataLab