knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The psfmi
package includes the function pool_performance
, to pool the performance
measures of logistic and Cox regression models. This vignette show you how to use this function.
The performance of a logistic regression model across multiply imputed datasets can be obtained as follows.
library(psfmi) perf <- pool_performance(data=lbpmilr, nimp=5, impvar="Impnr", formula = Chronic ~ Gender + Pain + Tampascale + Smoking + Function + Radiation + Age + Duration + BMI, cal.plot=TRUE, plot.method="mean", groups_cal=10, model_type="binomial") perf
For a Cox regression model the following code can be used.
library(survival) perf <- pool_performance(data=lbpmicox, nimp=5, impvar="Impnr", formula = Surv(Time, Status) ~ Duration + Pain + Tampascale + factor(Expect_cat) + Function + Radiation + Age , cal.plot=FALSE, model_type="survival") perf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.