An R Package to Determine Sample Size for Desired Predictive Power in Linear Regression

In predictive studies, it is important to know the amount of data needed to obtain a given prediction accuracy. Typically, models built on larger datasets produce more accurate results but are more expensive, so knowing the minimal number of samples needed to achieve a certain accuracy level can save costs. This project creates an R package that generates the efficient sample size needed to obtain given criterion for predictive accuracy. The criterion used is based on the predictive mean square error (PMSE) and relative proportional reduction of PMSE. The function allows for different measures of effect size as inputs, and accounts for number of predictors and their correlations. It can use parameters like predictor error variance and the covariance matrix of predictors, or it can use other values like R2 and Cohen’s f2, in obtaining a sample size. These values can typically be obtained from previous studies or appropriate assumptions. The function is applied to a real study on pain intensity in older black women, demonstrating a practical application in planning prediction-related studies. These calculations are also validated by simulations on the data.

Publication Details

Journal
DigitalCommons-IMSA (Illinois Mathematics and Science Academy)
Published
2025-04-17
Primary Topic
Radiation Effects in Electronics
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An R Package to Determine Sample Size for Desired Predictive Power in Linear Regression

DigitalCommons-IMSA (Illinois Mathematics and Science Academy)
Radiation Effects in Electronics
article

An R Package to Determine Sample Size for Desired Predictive Power in Linear Regression

article en

Abstract

In predictive studies, it is important to know the amount of data needed to obtain a given prediction accuracy. Typically, models built on larger datasets produce more accurate results but are more expensive, so knowing the minimal number of samples needed to achieve a certain accuracy level can save costs. This project creates an R package that generates the efficient sample size needed to obtain given criterion for predictive accuracy. The criterion used is based on the predictive mean square error (PMSE) and relative proportional reduction of PMSE. The function allows for different measures of effect size as inputs, and accounts for number of predictors and their correlations. It can use parameters like predictor error variance and the covariance matrix of predictors, or it can use other values like R2 and Cohen’s f2, in obtaining a sample size. These values can typically be obtained from previous studies or appropriate assumptions. The function is applied to a real study on pain intensity in older black women, demonstrating a practical application in planning prediction-related studies. These calculations are also validated by simulations on the data.

DigitalCommons-IMSA (Illinois Mathematics and Science Academy)
Gender equality
Openalex Percentile: Top 53%
Radiation Effects in Electronics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.