simIDE: Simulate datasets from the IDE model

View source: R/IDEfunctions.R

simIDER 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: θ_{p,1} = 150, θ_{p,2} = 0.002, θ_{p,3} = -0.1, and θ_{p,4} = 0.1. See IDE for details on these parameters. When a spatially-varying kernel is used, θ_{p,1} = 200, θ_{p,2} = 0.002, and θ_{p,3}(s), θ_{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)

andrewzm/IDE documentation built on June 12, 2022, 1:12 p.m.