# \donttest{
library(mgwrsar)
library(ggplot2)
library(gridExtra)
library(grid)
# Simulate data using Geniaux (2024) DGP
simu <- simu_multiscale(n = 1000, type = 'GG2024', config_snr = 0.7)
mydata <- simu$mydata
coords <- simu$coords
# Visualizing the spatial patterns of the coefficients
p1 <- ggplot(mydata, aes(x, y, col = Beta1)) + geom_point() + scale_color_viridis_c()
p2 <- ggplot(mydata, aes(x, y, col = Beta2)) + geom_point() + scale_color_viridis_c()
p3 <- ggplot(mydata, aes(x, y, col = Beta3)) + geom_point() + scale_color_viridis_c()
p4 <- ggplot(mydata, aes(x, y, col = Beta4)) + geom_point() + scale_color_viridis_c()
grid.arrange(p1, p2, p3, p4, nrow = 2, ncol = 2,
top = textGrob("DGP Geniaux (2024)", gp = gpar(fontsize = 20, font = 3)))
# }
Run the code above in your browser using DataLab