Pool Model Performance"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(survival)
library(psfmi)

Introduction

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.

Examples

Performance Logistic regression model

The performance of a logistic regression model across multiply imputed datasets can be obtained as follows.

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

Performance Cox regression model

For a Cox regression model the following code can be used.

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


Try the psfmi package in your browser

Any scripts or data that you put into this service are public.

psfmi documentation built on July 9, 2023, 7:02 p.m.