powered by
Generates a synthetic dataset for testing the SemiparMF model. Structure follows Equation (7) in Malabanan et al. (2022).
simulate_semipar_data( n_side = 6, t_len = 50, k = 3, rho_error = 0.5, beta = 0.5, gamma = 0.3 )
A list containing:
An sf object containing Y, Z, W, and geometry.
sf
An array (N x T x K) of high-frequency covariates.
List of true parameters used for generation.
Integer. Grid side length. Total locations N = n_side^2.
Integer. Length of the time series (T).
Integer. Frequency ratio (e.g., 3 months per quarter).
Numeric. Autocorrelation coefficient for the error term (default 0.5).
True coefficient for covariate Z (default 0.5).
True coefficient for neighborhood variable W (default 0.3).
# Generate a small dataset sim <- simulate_semipar_data(n_side = 4, t_len = 10, k = 3) # Check dimensions dim(sim$data) # 160 x 5 (16 locations * 10 time points) dim(sim$X_high) # 16 x 10 x 3
Run the code above in your browser using DataLab