NSconvo_sim: Simulate data from the nonstationary model.

Description Usage Arguments Value Examples

View source: R/convoSPAT_simulate.R

Description

NSconvo_sim simulates data from the nonstationary model, given mixture component kernel matrices. The function requires either a mixture component kernel object, from the function f.mc.kernels(), or a direct specification of the mixture component locations and mixture component kernels.

Usage

1
2
3
4
5
NSconvo_sim(grid = TRUE, y.min = 0, y.max = 5, x.min = 0, x.max = 5,
  N.obs = 20^2, sim.locations = NULL, mc.kernels.obj = NULL,
  mc.kernels = NULL, mc.locations = NULL, lambda.w = NULL, tausq = 0.1,
  sigmasq = 1, beta.coefs = 4, kappa = NULL, covariates = rep(1, N.obs),
  cov.model = "exponential")

Arguments

grid

Logical; indicates of the simulated data should fall on a grid (TRUE) or not (FALSE).

y.min

Lower bound for the y-coordinate axis.

y.max

Upper bound for the y-coordinate axis.

x.min

Lower bound for the y-coordinate axis.

x.max

Upper bound for the y-coordinate axis.

N.obs

Number of simulated data values.

sim.locations

Optional N.obs x 2 matrix; allows the user to specify the locations of the simulated data.

mc.kernels.obj

Object from the f_mc_kernels function.

mc.kernels

Optional specification of mixture component kernel matrices.

mc.locations

Optional specification of mixture component locations.

lambda.w

Scalar; tuning parameter for the weight function.

tausq

Scalar; true nugget variance.

sigmasq

Scalar; true process variance.

beta.coefs

Vector of true regression coefficients. Length must match the number of columns in covariates.

kappa

Scalar; true smoothness.

covariates

Matrix with N.obs rows, corresponding to covariate information for each of the simualted values.

cov.model

A string specifying the correlation function. Options available in this package are: "exponential", "cauchy", "matern", "circular", "cubic", "gaussian", "spherical", and "wave". See cov.spatial for further documentation.

Value

A list with the following components:

sim.locations

Matrix of locations for the simulated values.

mc.locations

Mixture component locations used for the simulated data.

mc.kernels

Mixture component kernel matrices used for the simulated data.

kernel.ellipses

N.obs x 2 x 2 array, containing the kernel matrices corresponding to each of the simulated values.

Cov.mat

True covariance matrix (N.obs x N.obs) corresponding to the simulated data.

sim.data

Simulated data values.

lambda.w

Tuning parameter for the weight function.

Examples

1
2
3
4
5
6
7
8
## Not run: 
NSconvo_sim( grid = TRUE, y.min = 0, y.max = 5, x.min = 0,
x.max = 5, N.obs = 20^2, sim.locations = NULL, mc.kernels.obj = NULL,
mc.kernels = NULL, mc.locations = NULL, lambda.w = NULL,
tausq = 0.1, sigmasq = 1, beta.coefs = 4, kappa = NULL,
covariates = rep(1,N.obs), cov.model = "exponential" )

## End(Not run)

markdrisser/convoSPAT documentation built on May 21, 2019, 11:48 a.m.