Skip to contents

Simulate and Summarize Projection Pursuit Index (PPI) Values

Usage

ppi_mean(data, index_fun, n_sim = 100, n_obs = 300)

Arguments

data

A data frame or matrix. Must have at least two columns.

index_fun

A function taking two numeric vectors (x, y) and returning a scalar index.

n_sim

Integer. Number of simulations. Default is 100.

n_obs

Integer. Number of observations to sample in each simulation. Default is 300.

Value

A tibble with:

  • var_i, var_j: Names of variable pairs

  • mean_index: Mean index value over simulations

Examples

data <- as.data.frame(data_gen(type = "polynomial", degree = 2))
ppi_mean(data, scag_index("stringy"), n_sim = 10)
#> # A tibble: 1 × 3
#>   var_i var_j mean_index
#>   <chr> <chr>      <dbl>
#> 1 1     2              1