Sample Size for Validation of Risk Models with Binary Outcomes

Estimation of the required sample size to validate a risk model for binary outcomes, based on the sample size equations proposed by Pavlou et al. (2021) . For precision-based sample size calculations, the user is required to enter the anticipated values of the C-statistic and outcome prevalence, which can be obtained from a previous study. The user also needs to specify the required precision (standard error) for the C-statistic, the calibration slope and the calibration in the large. The calculations are valid under the assumption of marginal normality for the distribution of the linear predictor.



output: html_document: df_print: paged word_document: default pdf_document: default

sampsizeval

Travis build status R-CMD-check

The purpose of sampsizeval is to perform sample size calculations for the validation of risk models for binary outcomes.

Installation

The development version can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("mpavlou/sampsizeval")

Example

This is an example of a sample size calculation to validate a risk model for a binary outcome. The anticipated values of the outcome prevalence and the C-statistic are p=0.1 and C=0.75, respectively.

library(sampsizeval)

The target is to calculate the size of the validation data so as to estimate the C-statistic, the Calibration Slope and the Calibration in the Large with sufficient precision. In this example, the required precision is reflected by a SE of the estimated C-statistic of at most 0.025, and SE of the estimated Calibration Slope and Calibration in the Large of at mos 0.1.

sampsizeval(p=0.1, c=0.75, se_c=0.025, se_cs =0.1, se_cl = 0.1)

The recommended sample size is 1536 observations.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sampsizeval")

1.0.0.0 by Menelaos Pavlou, 5 years ago


https://github.com/mpavlou/sampsizeval


Report a bug at https://github.com/mpavlou/sampsizeval/issues


Browse source code at https://github.com/cran/sampsizeval


Authors: Menelaos Pavlou [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, sn, pracma, dplyr, plyr

Suggests testthat


See at CRAN