simIDE {IDE} | R Documentation |
Simulate datasets from the IDE model
Description
Generates simulations that are then used to evaluate the fitting and prediction of an IDE model.
Usage
simIDE(T = 9, nobs = 100, k_spat_invariant = 1, IDEmodel = NULL)
Arguments
T |
number of time points to simulate |
nobs |
number of observations randomly scattered in the domain and fixed for all time intervals |
k_spat_invariant |
flag indicating whether to simulate using a spatially-invariant kernel or a spatially-variant one |
IDEmodel |
object of class IDE to simulate form (optional) |
Details
The domain considered is [0,1] x [0,1], and an IDE is simulated on top of a fixed effect comprising of an intercept, a linear horizontal effect, and a linear vertical effect (all with coefficients 0.2). The measurement-error variance and the variance of the additive disturbance are both 0.0001. When a spatially-invariant kernel is used, the following parameters are fixed: \theta_{p,1} = 150
, \theta_{p,2} = 0.002
, \theta_{p,3} = -0.1
, and \theta_{p,4} = 0.1
. See IDE
for details on these parameters. When a spatially-varying kernel is used, \theta_{p,1} = 200
, \theta_{p,2} = 0.002
, and \theta_{p,3}(s), \theta_{p,4}(s)
are smooth spatial functions simulated on the domain.
Value
A list containing the simulated process in s_df
, the simulated data in z_df
, the data as STIDF
in z_STIDF
, plots of the process and the observations in g_truth
and g_obs
, and the IDE model used to simulate the process and data in IDEmodel
.
See Also
show_kernel
for plotting the kernel and IDE
Examples
SIM1 <- simIDE(T = 5, nobs = 100, k_spat_invariant = 1)
SIM2 <- simIDE(T = 5, nobs = 100, k_spat_invariant = 0)