IDEAS home Printed from https://ideas.repec.org/c/boc/bocode/s458569.html
 

PMSAMPSIZE: Stata module to calculate the minimum sample size required for developing a multivariable prediction model

Author

Listed:
  • Joie Ensor

    (Institute of Applied Health Research, University of Birmingham)

Programming Language

Stata

Abstract

pmsampsize computes the minimum sample size required for the development of a new multivariable prediction model using the criteria proposed by Riley et al. 2018. pmsampsize can be used to calculate the minimum sample size for the development of models with continuous, binary or survival (time-to-event) outcomes. Riley et al. lay out a series of criteria the sample size should meet. These aim to minimise the overfitting and to ensure precise estimation of key parameters in the prediction model. For continuous outcomes, there are four criteria: i) small overfitting defined by an expected shrinkage of predictor effects by 10% or less, ii) small absolute difference of 0.05 in the model's apparent and adjusted R-squared value, iii) precise estimation of the residual standard deviation, and iv) precise estimation of the average outcome value. The sample size calculation requires the user to pre-specify (e.g. based on previous evidence) the anticipated R-squared of the model, and the average outcome value and standard deviation of outcome values in the population of interest. For binary or survival (time-to-event) outcomes, there are three criteria: i) small overfitting defined by an expected shrinkage of predictor effects by 10% or less, ii) small absolute difference of 0.05 in the model's apparent and adjusted Nagelkerke's R-squared value, and iii) precise estimation (within +/- 0.05) of the average outcome risk in the population for a key timepoint of interest for prediction.

Suggested Citation

  • Joie Ensor, 2018. "PMSAMPSIZE: Stata module to calculate the minimum sample size required for developing a multivariable prediction model," Statistical Software Components S458569, Boston College Department of Economics, revised 04 Dec 2023.
  • Handle: RePEc:boc:bocode:s458569
    Note: This module should be installed from within Stata by typing "ssc install pmsampsize". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
    as

    Download full text from publisher

    File URL: http://fmwww.bc.edu/repec/bocode/p/pmsampsize.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/p/pmsampsize.sthlp
    File Function: help file
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:bocode:s458569. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/debocus.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.