Generate samples from m sources and p parameters, n sample per source. Optionally pass the between-source alpha hyperparameter used to generate the source parameters.
fun_rdirichlet_population( n, m, p, alpha = NULL, name_var = "x", name_source = "theta" )
| n | number of samples per source |
|---|---|
| m | number of sources |
| p | number of variables |
| alpha | between-source alpha hyperparameter, a numeric vector or 1-row data.frame.
If |
| name_var | names for data variables (default: |
| name_source | names for source parameters (default: |
list of samples:
alpha: the Dirichlet hyperparameter
df_sources: tibble of the Dirichlet population parameters, source column is 'source', variables start with name_source
df_pop: the Dirichlet data, source column is 'source', variables start with name_var
names_var: names of columns containing data variables
names_source: names of columns containing source variables
Other population functions:
fun_rnorm_population()