View source: R/data_generator.R
| data_generator_po_1d | R Documentation |
Provides the current 1D generator while keeping access to the previous
implementation via version = "legacy" for reproducibility.
data_generator_po_1d(
n = 100,
grid_points = 100,
noise_sd = 0.25,
center = TRUE,
rsq = 0.95,
mu = 0.1,
univariate = TRUE,
response_type = c("gaussian", "binomial"),
linear_predictor = c("rectangular", "trapezoidal", "linear"),
n_missing = 1,
min_distance = NULL,
version = c("current", "legacy"),
...
)
n |
Number of samples to generate. |
grid_points |
Number of points in the grid. |
noise_sd |
Standard deviation of measurement noise. |
center |
Whether to mean-center each curve. |
rsq |
Desired R-squared value for the response. |
mu |
Intercept term added to the linear predictor. |
univariate |
If |
response_type |
Response distribution ("gaussian" or "binomial"). |
linear_predictor |
Integration approach for the linear predictor ("rectangular", "trapezoidal", or "linear"). |
n_missing |
Number of missing segments per curve. |
min_distance |
Minimum length of missing segments (defaults to one fifth of the grid length). |
version |
Choose |
... |
Additional arguments forwarded to the legacy implementation. |
A list containing simulated curves (noisy and noiseless), missing point indices, the coefficient functions, and the generated response.
data <- data_generator_po_1d(n = 10)
data_legacy <- data_generator_po_1d(n = 10, version = "legacy", beta_type = "trig")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.