powered by
Performs simulations to compute a projection pursuit index on structured (sampled) data and on random noise, allowing a comparison of index scale across contexts.
ppi_scale(data, index_fun, n_sim = 100, n_obs = 500, seed = NULL)
A tibble with columns:
simulation: simulation number
simulation
var_i, var_j: variable names
var_i
var_j
var_pair: pair name as a string
var_pair
sigma: 0 for structured data, 1 for noisy data
sigma
index: index value returned by index_fun
index
index_fun
A data frame or tibble with at least two numeric columns.
A function that takes two numeric vectors (x, y) and returns a numeric scalar index.
x
y
Integer. Number of simulations. Default is 100.
Integer. Number of observations per simulation. Default is 500.
Optional integer seed for reproducibility.
ppi_scale(data_gen("polynomial", degree = 3), scag_index("stringy"), n_sim = 2)
Run the code above in your browser using DataLab