Simulate Misaligned Spatial Data
simulate_misaligned_data(
seed = 2,
dist_covariates_x = c("normal", "poisson", "binomial"),
dist_covariates_y = c("normal", "poisson", "binomial"),
dist_y = "poisson",
x_intercepts = rep(0, 3),
y_intercepts = rep(0, 3),
rho_x = 0.6,
rho_y = 0.6,
x_correlation = 0.5,
y_correlation = 0.5,
beta0_y = NULL,
beta_x = NULL,
beta_y = NULL,
diff_pops = TRUE,
xy_cov_cor = FALSE
)List containing gridy, gridx, atoms, and true_params
Random seed (default = 2)
Vector specifying distribution type for each synthetic X-grid covariate ('poisson', 'binomial', or 'normal')
Vector specifying distribution type for each synthetic Y-grid covariate ('poisson', 'binomial', or 'normal')
Distribution type for synthetic outcome variable (one of 'poisson', 'binomial', or 'normal')
Intercepts for X covariates
Intercepts for Y covariates
Spatial correlation parameter for X-grid covariates (0 to 1 with higher values yielding more spatial correlation, default = 0.6)
Spatial correlation parameter for Y-grid covariates and outcome (0 to 1 with higher values yielding more spatial correlation, default = 0.6)
Between-variable correlation for all pairs of X-grid covariates (default = 0.5)
Between-variable correlation for all pairs of Y-grid covariates (default = 0.5)
Intercept for outcome model
Outcome model coefficients for X-grid covariates
Outcome model coefficients for Y-grid covariates
Logical, indicating whether the atoms should be generated with different population sizes (diff_pops = TRUE) or a common population size (diff_pops = FALSE)
Logical, indicating whether the atom-level spatial random effects for X-grid and Y-grid covariates should be correlated (xy_cov_cor = TRUE) or not. When set to TRUE, the x_correlation and rho_x parameters are used to generate all covariates (separate correlation parameters are not allowed for X-grid and Y-grid covariates).