Install
$ agentstack add skill-choxos-biostatagent-diagnostic-accuracy ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Diagnostic Accuracy Analysis in R
Overview
Comprehensive diagnostic test accuracy analysis covering ROC curve analysis, optimal cutpoint determination, sensitivity and specificity estimation, likelihood ratios, decision curve analysis, inter-rater reliability measures, and diagnostic meta-analysis.
Basic Diagnostic Measures
2x2 Table Analysis
library(epiR)
# Create 2x2 table
# Format: [TP, FN; FP, TN]
diag_table 0.9)
pauc_spec 0.9)
pauc_sens = 0.9
cp_constrained
plot(type = "clinical_impact")
# Net benefit with confidence intervals (bootstrap)
dca_boot Post-test probability:", round(post_prob_pos * 100, 1), "%\n")
cat("LR-:", lr_neg, "-> Post-test probability:", round(post_prob_neg * 100, 1), "%\n")
return(list(
pre_test = pre_test_prob,
post_test_positive = post_prob_pos,
post_test_negative = post_prob_neg
))
}
# Example usage
fagan_nomogram(pre_test_prob = 0.20, lr_pos = 8, lr_neg = 0.15)
Reporting Diagnostic Study Results
# Create comprehensive diagnostic report
create_diagnostic_report = cutpoint, 1, 0)
# Confusion matrix
cm <- table(Predicted = pred_class, Actual = df$disease)
TP <- cm[2, 2]; FN <- cm[1, 2]
FP <- cm[2, 1]; TN <- cm[1, 1]
# Calculate metrics
metrics <- data.frame(
Metric = c("AUC", "Cutpoint", "Sensitivity", "Specificity",
"PPV", "NPV", "LR+", "LR-", "Accuracy", "Youden Index"),
Value = c(
round(auc(roc_obj), 3),
round(cutpoint, 2),
round(TP / (TP + FN), 3),
round(TN / (TN + FP), 3),
round(TP / (TP + FP), 3),
round(TN / (TN + FN), 3),
round((TP / (TP + FN)) / (FP / (FP + TN)), 2),
round((FN / (TP + FN)) / (TN / (FP + TN)), 2),
round((TP + TN) / (TP + TN + FP + FN), 3),
round(TP / (TP + FN) + TN / (TN + FP) - 1, 3)
)
)
return(metrics)
}
Key Packages Summary
| Package | Purpose | |---------|---------| | pROC | ROC curve analysis and AUC | | cutpointr | Optimal cutpoint selection | | OptimalCutpoints | Multiple cutpoint methods | | dcurves | Decision curve analysis | | irr | Inter-rater reliability (kappa, ICC) | | mada | Diagnostic meta-analysis | | BlandAltmanLeh | Method agreement plots | | epiR | Diagnostic test evaluation | | DiagTest3Grp | Three-group ROC analysis | | caret | Confusion matrix utilities |
Best Practices
- Report multiple metrics: Sensitivity, specificity, PPV, NPV, and likelihood ratios
- Account for prevalence: PPV/NPV depend heavily on disease prevalence
- Use appropriate cutpoint method: Consider clinical consequences (cost of FN vs FP)
- Provide confidence intervals: Especially for AUC and diagnostic measures
- Check calibration: Predicted probabilities should match observed frequencies
- Decision curve analysis: Evaluates clinical utility across threshold range
- Consider spectrum bias: Ensure representative disease severity range
- Report according to STARD: Standards for Reporting of Diagnostic Accuracy Studies
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: choxos
- Source: choxos/BiostatAgent
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.