calcSS.RdWrapper for pmsampsize with R-squared estimation and allowing for imprecision in the estimate of rate and mean follow-up.
calcSS(rate, time, parameters, meanfollowup, imprecision = 0.2)Event rate at time
Time point to show performance at
Number of parameters in the model
The mean follow-up time
Allowance for imprecision in the rate and mean follow-up
GGPlot object
calcSS(
rate = 0.1,
time = 3,
parameters = 5,
meanfollowup = 4
)
#> NB: Assuming 0.05 acceptable difference in apparent & adjusted R-squared
#> NB: Assuming 0.05 margin of error in estimation of overall risk at time point = 3
#> NB: Events per Predictor Parameter (EPP) assumes overall event rate = 0.08
#>
#> Samp_size Shrinkage Parameter CS_Rsq Max_Rsq Nag_Rsq EPP
#> Criteria 1 403 0.90 5 0.1052543 0.702 0.15 20.63
#> Criteria 2 133 0.75 5 0.1052543 0.702 0.15 6.81
#> Criteria 3 * 403 0.90 5 0.1052543 0.702 0.15 20.63
#> Final SS 403 0.90 5 0.1052543 0.702 0.15 20.63
#>
#> Minimum sample size required for new model development based on user inputs = 403,
#> corresponding to 1289.6 person-time** of follow-up, with 104 outcome events
#> assuming an overall event rate = 0.08 and therefore an EPP = 20.63
#>
#> * 95% CI for overall risk = (0.176, 0.249), for true value of 0.213 and sample size n = 403
#> **where time is in the units mean follow-up time was specified in