Phi Statistics Drawer · Scientific documentation

Validation

Independent, reproducible verification of Phi Statistics Drawer 2.1.1 against reference calculations in R: 15,702 of 15,702 numerical comparisons passed, with no unresolved deviations.

1. Validation conclusion

Phi 2.1.1 met every prespecified numerical acceptance criterion. All 15,702 comparisons against R passed, all 10 input and rule checks passed, and no statistical implementation defect was identified.

The evidence supports that Phi reproducibly implements its documented descriptive, survival, ROC/AUC, and curve-fitting methods. This is software verification and numerical validation; it is not clinical validation and does not determine whether a selected method is appropriate for a particular research question.

15,702Numerical comparisons
100%Within prespecified tolerance
10 / 10Input and rule checks
0Unresolved deviations

2. Scope and terminology

Verification

Confirms that the production implementation follows Phi's documented formulas, data rules, and display logic.

Validation

Confirms that Phi's numerical outputs agree with independent calculations in R across ordinary and difficult datasets.

The assessment covered the actual production routines for:

  • numeric and delimited-text parsing;
  • bar charts, boxplots, grouped and stacked bars, and paired dot plots;
  • Kaplan–Meier survival, risk sets, Greenwood variance, and pointwise log–log confidence intervals;
  • ROC curves, AUC, Youden cutoff, DeLong statistics, paired marker comparisons, and bootstrap intervals;
  • linear, logarithmic, and exponential regression;
  • forest-plot preservation and rejection rules.

3. Validation design

The test harness called validation hooks attached directly to Phi's production functions. It did not substitute a second JavaScript implementation of the statistical methods. R independently processed the same retained input datasets.

AreaDataset designCoverage
Descriptive toolsCanonical and deterministic generated datasets104 datasets; signed values, ties, constants, singletons, multiple groups and categories
RegressionSeparate deterministic sets for every model52 datasets per model; 4,867 observations overall
Kaplan–MeierCanonical and generated time-to-event data56 datasets; ties, censoring, zero-time events, terminal events, and no-event data
ROC/AUCPaired marker datasets with fixed class order55 datasets; both directions, ties, imbalance, paired DeLong, and bootstrap subset
Input and forest rulesHand-constructed boundary cases10 explicit parsing, delimiter, scale, and interval checks

4. Independent R reference

The reference environment was frozen and recorded with the result files:

  • R: 4.5.2
  • survival: 3.8-3
  • pROC: 1.19.0.1
  • D3 used by Phi: 6.7.0
  • Regression precision used by Phi: 10 decimal places

Base R provided descriptive summaries and regression reference calculations. Quartiles used R's type-7 empirical quantile, matching D3 interpolation. survival::survfit provided the Kaplan–Meier reference. pROC provided AUC and DeLong reference values.

Phi reports an observed marker value as the Youden cutoff. Some R functions instead report the midpoint between adjacent observations. The validation therefore evaluated Phi's documented observed-threshold definition independently in R rather than treating this intentional reporting difference as an error.

5. Prespecified acceptance criteria

Output classAcceptance criterion
Counts, groups, exclusions, frequenciesExact equality
Deterministic numerical resultsAbsolute difference ≤ 1 × 10−10
Regression library outputsAbsolute difference ≤ 1 × 10−9
Kaplan–Meier log–log confidence limitsAbsolute difference ≤ 1 × 10−4
Normal-approximation p-valuesAbsolute difference ≤ 1 × 10−6
Independent bootstrap percentile limitsAbsolute difference ≤ 0.04

6. Results

Module familyComparisonsPassedMaximum absolute differenceStatus
Descriptive and categorical tools6,7556,7551.28 × 10−13Passed
Regression tools6246240Passed
Kaplan–Meier and risk sets7,6987,6981.32 × 10−5Passed
ROC/AUC deterministic statistics6056051.39 × 10−7Passed
ROC bootstrap limits20200.0167Passed
Total15,70215,702Passed

Observed numerical agreement

Descriptive calculations agreed with R to floating-point precision. All three regression families reproduced the independently evaluated R results exactly at the ten-decimal production precision. ROC/AUC and paired DeLong differences were below 1.39 × 10−7, driven by Phi's documented normal-distribution approximation for p-values.

The largest Kaplan–Meier difference was 0.0000133 in a confidence limit. Phi uses the documented multiplier 1.96, whereas R uses the more precise 97.5% standard-normal quantile. Five confidence-limit values near a rounding boundary consequently differed in the third displayed decimal; all remained well inside the prespecified tolerance and the underlying survival estimates and risk sets agreed.

Bootstrap samples were generated independently in Phi and R, so identical limits were neither expected nor required. The largest observed limit difference was 0.0167, below the prespecified 0.04 criterion.

7. Interpretation

The validation demonstrates that Phi 2.1.1 accurately transforms valid input data into the documented summary statistics, survival estimates, ROC/AUC results, regression parameters, tables, and plot data. No hidden smoothing, inferential testing, or undocumented data replacement was found.

Release assessment: Phi Statistics Drawer 2.1.1 is verified against its methodology and numerically validated against R for its intended role as a statistical visualization and descriptive curve-fitting tool.

8. Limitations and intended use

  • The validation establishes software correctness, not the suitability of a method for a particular dataset.
  • It does not establish clinical performance, diagnostic accuracy of a real biomarker, or regulatory fitness.
  • Bootstrap confidence limits are stochastic estimates and may vary slightly across independent runs and software environments.
  • Forest plots visualize user-supplied estimates and intervals; responsibility for those source estimates remains with the user.
  • Users remain responsible for data quality, study design, model choice, interpretation, and independent scientific review.