sample_ABC_rdirdirgamma_beta_cpp: Perform ABC sampling and distance calculation using the stick...

Description Usage Arguments Details Value See Also

View source: R/RcppExports.R

Description

Perform ABC sampling and distance calculation using the stick breaking procedure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sample_ABC_rdirdirgamma_beta_cpp(
  n_sample,
  m_sample,
  alpha_0,
  beta_0,
  nu_0,
  mtx_obs,
  reps,
  p_norm = 2,
  use_optimized_summary = FALSE
)

Arguments

n_sample

hyperparameters that are used to generate data: number of samples per source

m_sample

hyperparameters that are used to generate data: number of sources

alpha_0

hyperparameters that are used to generate data

beta_0

hyperparameters that are used to generate data

nu_0

hyperparameters that are used to generate data

mtx_obs

the observed data matrix

reps

number of ABC samples to generate

p_norm

exponent of the L^p norm (can be Inf) (default: 2)

use_optimized_summary

if TRUE, return the optimized summary statistics (mean, sd, kurtosis, skewness), else standard (mean, sd)

Details

Procedure

  1. samples from Dirichlet using rdirdirgamma_beta_cpp().

  2. computes summary statistics on datasets:

or a set of column-wise moments (mean, sd, kurtosis, skewness).

  1. the generated dataset is invisibly is truncated to the same amount of rows as the observed dataset.

  2. compute the Minkowski norms of the differences between summary statistics.

  3. repeat reps times.

RNG

this function uses R's RNG seed.

Value

a reps*2 matrix of distances between summary statistics

See Also

Other ABC functions: compute_ABC_cpp(), compute_distances_gen_obs_cpp(), generate_acceptable_data_cpp()


lgaborini/rdirdirgamma documentation built on March 6, 2021, 3:05 p.m.