1. Validation conclusion
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.
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.
| Area | Dataset design | Coverage |
|---|---|---|
| Descriptive tools | Canonical and deterministic generated datasets | 104 datasets; signed values, ties, constants, singletons, multiple groups and categories |
| Regression | Separate deterministic sets for every model | 52 datasets per model; 4,867 observations overall |
| Kaplan–Meier | Canonical and generated time-to-event data | 56 datasets; ties, censoring, zero-time events, terminal events, and no-event data |
| ROC/AUC | Paired marker datasets with fixed class order | 55 datasets; both directions, ties, imbalance, paired DeLong, and bootstrap subset |
| Input and forest rules | Hand-constructed boundary cases | 10 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.
5. Prespecified acceptance criteria
| Output class | Acceptance criterion |
|---|---|
| Counts, groups, exclusions, frequencies | Exact equality |
| Deterministic numerical results | Absolute difference ≤ 1 × 10−10 |
| Regression library outputs | Absolute difference ≤ 1 × 10−9 |
| Kaplan–Meier log–log confidence limits | Absolute difference ≤ 1 × 10−4 |
| Normal-approximation p-values | Absolute difference ≤ 1 × 10−6 |
| Independent bootstrap percentile limits | Absolute difference ≤ 0.04 |
6. Results
| Module family | Comparisons | Passed | Maximum absolute difference | Status |
|---|---|---|---|---|
| Descriptive and categorical tools | 6,755 | 6,755 | 1.28 × 10−13 | Passed |
| Regression tools | 624 | 624 | 0 | Passed |
| Kaplan–Meier and risk sets | 7,698 | 7,698 | 1.32 × 10−5 | Passed |
| ROC/AUC deterministic statistics | 605 | 605 | 1.39 × 10−7 | Passed |
| ROC bootstrap limits | 20 | 20 | 0.0167 | Passed |
| Total | 15,702 | 15,702 | — | Passed |
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.
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.
