Skip to content

R package: Estimation of Required Sample Size for Validation of Risk Models for Binary Outcomes

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

mpavlou/sampsizeval

Repository files navigation

output
html_document word_document pdf_document
df_print
paged
default
default

sampsizeval

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

Installation

You can install the released version of sampsizeval from CRAN with:

install.packages("sampsizeval")

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.

About

R package: Estimation of Required Sample Size for Validation of Risk Models for Binary Outcomes

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages