Learn R Programming

MultiDiscreteRNG (version 0.1.0)

calc.bin.prob.GPD: Collapse discrete generalized Poisson outcomes to binary variables

Description

This function implements Step 1 of the algorithm. It collapses each discrete outcome from the generalized Poisson distribution (GPD) into a binary probability and determines a dichotomous threshold for each variable.

Usage

calc.bin.prob.GPD(GPD.theta.vec, GPD.lambda.vec)

Value

A list containing the binary probability vector, the list of GPD probability mass functions for each variable, and the corresponding threshold indices.

Arguments

GPD.theta.vec

Numeric vector of GPD theta parameters.

GPD.lambda.vec

Numeric vector of GPD lambda parameters.

Examples

Run this code
# Prepare three GPD parameter vectors
GPD.lambda.vec <- c(0.1, 0.2, 0.3)
GPD.theta.vec  <- c(7, 0.7, 40)

# Compute binary probabilities, PMFs, and thresholds
p <- calc.bin.prob.GPD(GPD.theta.vec, GPD.lambda.vec)


Run the code above in your browser using DataLab