fun_rdirichlet_population: Generate a Dirichlet-Dirichlet population.

Description Usage Arguments Value See Also

View source: R/dirichlet.R

Description

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.

Usage

1
2
3
4
5
6
7
8
fun_rdirichlet_population(
  n,
  m,
  p,
  alpha = NULL,
  name_var = "x",
  name_source = "theta"
)

Arguments

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 NULL (default), it is generated from the Uniform distribution on the (p-1)-simplex (see fun_rdirichlet_hyperparameter()).

name_var

names for data variables (default: 'x')

name_source

names for source parameters (default: 'theta')

Value

list of samples:

See Also

Other population functions: fun_rnorm_population()


lgaborini/rsamplestudy documentation built on March 6, 2021, 3:18 p.m.