Skip to content

Validate or normalize hair color proportions so they sum to 1 #13

@borich-hub

Description

@borich-hub

In the lrComparisonApp() UI, the population hair color sliders (propC1–propC5) can sum to values greater or less than 1. Since these represent probabilities, the CPT built by cpt_pop_function() assumes they sum to 1. Otherwise, resulting probabilities become inconsistent. The simple suggested fixes would be to automatically normalize with propC <- propC / sum(propC) before using it or show a validation message in the Shiny UI if the total ≠ 1. This would prevent unintended distortions and improve model accuracy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions