Skip to content

Fix M3 method in .calculateCostMetrics() and .calculateCensoredContribution() #251

Description

@rengelke

.calculateCostMetrics() double-counts censored observations by including them in the LSQ sum and then adding the M3 term on top. In .calculateCensoredContribution(), stDev is computed from unique(lloq), producing a vector that mismatches per-observation pnorm() calls when datasets have different LLOQs. scaling is also injected by mutating a runtime copy of objectiveFunctionOptions.

Exclude censored rows from the LSQ sum. Compute stDev per row as abs(linScaleCV * observedCensored$lloq). Pass scaling directly from PIOutputMapping$scaling without mutating config objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions