Skip to contents

Dirichlet sampling with structural zeros

Usage

synthetic.sampling.dirichlet.zeros(
  concentration,
  zero.fraction,
  zero.parts,
  zero.row.policy = c("first", "random"),
  count.rounding = "round",
  algorithm = "normalized.gamma.v1"
)

Arguments

concentration

Scalar or part-wise Dirichlet concentration.

zero.fraction

Fraction of rows receiving structural zeros.

zero.parts

Part indices set to zero.

zero.row.policy

Row-selection policy.

count.rounding

Count rule.

algorithm

Versioned draw algorithm.

Value

A synthetic sampling component.

Examples

synthetic.sampling.dirichlet.zeros(
  concentration = rep(1, 3), zero.fraction = 0.2, zero.parts = 1L
)
#> $kind
#> [1] "sampling"
#> 
#> $family
#> [1] "dirichlet.zeros"
#> 
#> $version
#> [1] 1
#> 
#> $parameters
#> $parameters$concentration
#> [1] 1 1 1
#> 
#> $parameters$zero.fraction
#> [1] 0.2
#> 
#> $parameters$zero.parts
#> [1] 1
#> 
#> $parameters$zero.row.policy
#> [1] "first"
#> 
#> $parameters$count.rounding
#> [1] "round"
#> 
#> $parameters$algorithm
#> [1] "normalized.gamma.v1"
#> 
#> 
#> attr(,"class")
#> [1] "synthetic_dirichlet_zeros_sampling" "synthetic_sampling_component"      
#> [3] "synthetic_sampling"                 "synthetic_component"