Skip to contents

The srpareto_optimize() function generates an optimized proposal for a targeted Pareto Distribution. The proposal can be customized and adjusted based on various options provided by the user.

Usage

srpareto_optimize(
  scale = NULL,
  shape = NULL,
  xl = NULL,
  xr = NULL,
  steps = 4091,
  proposal_range = NULL,
  theta = 0.1,
  target_sample_size = 1000,
  verbose = FALSE
)

Arguments

scale

(optional) Numeric. scale parameter of the Pareto Distribution. Defaults to NULL, which implies a scalable proposal with scale = 1.

shape

(optional) Numeric. shape parameter of the Pareto Distribution. Defaults to NULL, which implies a scalable proposal with shape = 1.

xl

Numeric. Left truncation bound for the target distribution. Defaults to -Inf, representing no left truncation.

xr

Numeric. Right truncation bound for the target distribution. Defaults to Inf, representing no right truncation.

steps

(optional) Integer. Desired number of steps in the proposal. Defaults to NULL, which means the number of steps is determined automatically during optimization.

proposal_range

(optional) Numeric vector. Specifies the range for optimizing the steps part of the proposal. Defaults to NULL, indicating automatic range selection.

theta

Numeric. A parameter for proposal optimization. Defaults to 0.1.

target_sample_size

(optional) Integer. Target sample size for proposal optimization. Defaults to 1000.

verbose

Boolean. If TRUE, detailed optimization information, including areas and steps, will be displayed. Defaults to FALSE.

Value

The user does not need to store the returned value, because the package internally cashes the proposal. However, we explain here the full returned proposal for advanced users.

A list containing the optimized proposal and related parameters for the specified built-in distribution: #'

data

Detailed information about the proposal steps, including x, s_upper, p_a, and s_upper_lower.

areas

The areas under the left tail, steps, and right tail of the proposal distribution.

steps_number

The number of steps in the proposal.

f_params

The parameters (scale and shape) of the Beta distribution.

Details

When srpareto_optimize() is explicitly called:

  • A proposal is created and cached. If no parameters are provided, a standard proposal is created with rate = 1.

  • Providing rate creates a custom proposal, which is cached for use with srpareto_custom().

  • The optimization process can be controlled via parameters such as steps, proposal_range, or theta. If no parameters are provided, the proposal is optimized via brute force based on the. target_sample_size.

See also

srpareto_custom: Function to sample from a custom proposal tailored to user specifications.

Examples

# Generate scalable proposal that with rate = 1, that has 4096 steps
scalable_proposal <- srpareto_optimize(steps = 4096)

# Generate custom proposal that with scale = 4
scalable_proposal <- srpareto_optimize(scale = 4)