View source: R/data_generator.R
| data_generator_po_2d | R Documentation |
Simulates a scalar response together with partially observed functional surfaces. The response is built from the integral of each surface against a fixed coefficient surface, and a rectangular region of each surface can be left unobserved.
data_generator_po_2d(
n = 100,
grid_x = 20,
grid_y = 20,
intercept = 0.6,
noise_sd = 0.25,
response_type = c("binomial", "gaussian"),
signal_strength = 2.5,
n_missing = 0,
min_distance_x = NULL,
min_distance_y = NULL,
verbose = FALSE
)
n |
Number of surfaces to generate. |
grid_x, grid_y |
Number of grid points along each axis. |
intercept |
Model intercept. For the binomial response it is used as the target proportion of successes. |
noise_sd |
Standard deviation of the observation noise, relative to the standard deviation of each surface. |
response_type |
Response distribution, either |
signal_strength |
Multiplier controlling the magnitude of the true coefficient surface. |
n_missing |
Number of unobserved rectangular regions per surface
(default |
min_distance_x, min_distance_y |
Minimum size of the unobserved regions along each axis. |
verbose |
If |
A list with the true surfaces (surfaces), the noisy surfaces
(noisy_surfaces), the partially observed surfaces
(noisy_surfaces_miss) together with the missing point information
(miss_points, missing_points), the response, the true
coefficient surface (beta), the grids (points_x,
points_y) and additional simulation details.
set.seed(123)
sim <- data_generator_po_2d(n = 20, grid_x = 10, grid_y = 10,
response_type = "gaussian")
str(sim, max.level = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.