direct-sampler: Direct Sampler

direct-samplerR Documentation

Direct Sampler

Description

Basic and customized versions of the direct sampler.

Usage

direct_sampler_basic(n, w, g, N = 100, max_iter = 10000)

direct_sampler(
  n,
  w,
  g,
  tol = 1e-08,
  N = 100,
  fill_method = "small_rects",
  priority_weight = 1/2
)

Arguments

n

Number of draws to generate.

w

A weight function object.

g

A base distribution object.

N

Number of knots to use in approximation for p(u). Specifically, N+1 points will be used.

max_iter

Maximum number of accept/reject attempts to try for each draw.

tol

Tolerance for step function approximation in customized sampler.

fill_method

Knot selection method for customized sampler. See Stepdown.

priority_weight

TBD


andrewraim/DirectSampling documentation built on June 5, 2024, 4:36 p.m.