sim_rrsm: Simulate large spatial dataset

Description Usage Arguments Value Note

View source: R/sim_rrsm.r

Description

Simulates a large spatial dataset according to a Spatial Random Effects model: Y = Xβ + Sη + ε

Usage

1
2
sim_rrsm(X, S, beta = NULL, V = NULL, ssq = 0.001, theta = NULL,
  coords = NULL, knots = NULL, dist = "mvrnorm", seed = NULL, ...)

Arguments

X

the design matrix for the large-scale variation (fixed effects).

S

the matrix of basis functions (design matrix for the random effect).

beta

the large-scale variation vector (fixed-effects slopes).

V

the covariance matrix of the reduced rank process.

ssq

the residual variance.

theta

the spatial dependence parameter, for if V needs to be calculated.

coords

the observed locations, for if S needs to be calculated.

knots

the knot locations, for if S needs to be calculated.

dist

the distribution to use for simulating data. Currently only "mvrnorm" is supported.

seed

optional means to control the RNG seed.

...

space for additional arguments.

Value

A vector containing the simulated values.

Note

Several arguments, including S, V, and ssq may be left empty, if locations and knots are provided to calculate them.


jelsema/RRSM documentation built on May 19, 2019, 4:02 a.m.