Discretize a probability distribution.

.get_discretized_distribution(distribution, right_boundary, offset_by_one)

Arguments

distribution

list. probability distribution specified in list format e.g. list(name = "gamma", shape = 2, scale = 4). The distribution list must contain a 'name' element, this element must be a string and correspond to one of the types of distributions supported in the Distributions package. distribution must also contain parameters for the specified distribution, in the form 'parameter_name=parameter_value'.

right_boundary

positive numeric value. Maximum number of time steps to discretize the distribution over.

offset_by_one

boolean. Set to TRUE if distribution represents the fit of data that was offset by one (fitted_data = original_data + 1) to accommodate zeroes in original_data.

Value

vector containing weights of the discretized probability distribution.