cocoSim {cocons} | R Documentation |
Marginal and conditional simulation of nonstationary Gaussian processes
Description
draw realizations of stationary and nonstationary Gaussian processes with covariate-based covariance functions.
Usage
cocoSim(coco.object, pars, n, seed, standardize,
type = 'classic', sim.type = NULL, cond.info = NULL)
Arguments
coco.object |
( |
pars |
( |
n |
( |
seed |
( |
standardize |
( |
type |
( |
sim.type |
( |
cond.info |
( |
Details
The argument sim.type = 'cond'
specifies a conditional simulation, requiring cond.info
to be provided.
cond.info
is a list including newdataset
, a data.frame containing covariates present in model.list
at the simulation locations, and newlocs
,
a matrix specifying the locations corresponding to the simulation, with indexing that matches newdataset
.
The argument type = 'classic'
assumes a simplified parameterization for the covariance function, with log-parameterizations applied to the parameters std.dev
,
scale
, and smooth
.
Value
(matrix
) a matrix dim(data)[1] x n.
Author(s)
Federico Blasi
See Also
Examples
## Not run:
model.list <- list('mean' = 0,
'std.dev' = formula( ~ 1 + cov_x + cov_y),
'scale' = formula( ~ 1 + cov_x + cov_y),
'aniso' = 0,
'tilt' = 0,
'smooth' = 0.5,
'nugget' = -Inf)
coco_object <- coco(type = 'dense',
data = holes[[1]][1:1000,],
locs = as.matrix(holes[[1]][1:1000,1:2]),
z = holes[[1]][1:1000,]$z,
model.list = model.list)
coco_sim <- cocoSim(coco.object = coco_object,
pars = c(0,0.25,0.25, # pars related to std.dev
log(0.25),1,-1), # pars related to scale
n = 1,
standardize = TRUE)
fields::quilt.plot(coco_object@locs,coco_sim)
## End(Not run)