Skip to contents

Extracts distribution-specific parameters (mean, sd, rate, shape, range) from details subset. Auto-detects distribution type if not specified.

Usage

extract_distribution_params(details_subset, distribution_type = NULL)

Arguments

details_subset

Data frame. Rows from details for one variable.

distribution_type

Character. Optional ("normal", "uniform", "gompertz", "exponential", "poisson"). If NULL, attempts auto-detection.

Value

Named list with distribution type and parameters:

  • distribution: Character. Distribution type.

  • mean, sd: Numeric. For normal distribution.

  • rate, shape: Numeric. For Gompertz/exponential.

  • range_min, range_max: Numeric. For uniform or truncation.

Examples

if (FALSE) { # \dontrun{
params <- extract_distribution_params(details_subset, "normal")
# Returns: list(distribution = "normal", mean = 25, sd = 5, range_min = 18.5, range_max = 40)
} # }