Add model score prediction and survival curve plotting functionality#38
Conversation
Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com>
Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com>
|
示例代码运行报错: 另外我看到 这里 predictions <- predict(model, newdata = newdata, type = type) 完全一样的。请检查下逻辑,如果没有必要区分 coxph,代码全部使用通用代码,但需要确保和校对计算逻辑 |
Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com>
Fixed the survival curves error! The issue was in the data frame creation where Regarding the assignment operator issue, I checked the code and it's already correct - the |
|
@copilot 请合并下 main 分支代码,解决文件冲突 |
- Resolved import conflicts in R/00-bregr-package.R - Combined br_show_survival_curves and br_show_residuals functions in R/04-show.R - Updated documentation to include both functions in man/br_show_risk_network.Rd
已成功合并main分支代码并解决所有冲突。合并包括: ✅ 解决了R/00-bregr-package.R中的导入冲突(合并survival和mirai导入) 测试确认所有功能正常工作。合并已在commit 0facc63中完成。 |
Refactored br_predict and br_show_survival_curves to use consistent argument names (idx), improved error handling, and updated documentation and examples for clarity. Added br_predict and br_show_survival_curves to pkgdown reference. Removed outdated example and test artifacts. Updated README and man pages to reflect new usage and output.
This PR adds support for model final score grouping to draw survival comparison curves, addressing the need for a predict interface in the bregr package.
New Features
1. Model Score Prediction (
br_predict)Added a new
br_predict()function that generates predictions from fitted models in abregobject:2. Survival Curve Plotting (
br_show_survival_curves)Added
br_show_survival_curves()function for creating Kaplan-Meier survival curves grouped by model prediction scores:Implementation Details
bregworkflowExample Usage
This implementation provides the foundation for model score-based survival analysis workflows while maintaining full backward compatibility with existing bregr functionality.
Fixes #25.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.