| precomputed | R Documentation |
Results from four completed sample-size searches, one for each of the package's entry points. A search repeatedly simulates datasets, fits a prediction model to each and evaluates its performance across a range of candidate sample sizes, so a realistic run takes minutes to hours. These objects were computed once, with the calls shown under Source, so that the examples and the vignette can demonstrate the output without recomputing it.
binary_example
continuous_example
survival_example
custom_example
A list of class "pmsims". The most useful components are:
min_nThe estimated minimum sample size.
perf_nExpected performance at min_n.
target_performanceThe performance target the search aimed for.
metricThe performance metric used.
modelThe model fitted to each simulated dataset.
status"ok" when the search found min_n and a check at
min_n confirmed it; see simulate_custom() for other values.
dataThe simulated performance values at each sample size,
used by plot().
diagnosticsDetails of the search, including the fitted
learning curve and the interval for min_n (diagnostics$curve).
summariesAggregated performance summaries across replications.
simulation_timeElapsed time of the original run, in seconds.
Objects produced by the wrapper functions additionally record the
data-generating configuration (for example outcome_prevalence,
correlation and complexity); see simulate_binary() for the full set.
An object of class pmsims of length 43.
An object of class pmsims of length 42.
An object of class pmsims of length 44.
An object of class pmsims of length 31.
Each object is a "pmsims" object, as returned by simulate_binary(),
simulate_continuous(), simulate_survival() and simulate_custom(), and
can be used with print() and plot() in the usual way.
Generated by data-raw/precomputed-examples.R.
binary_example:
set.seed(123) simulate_binary( signal_parameters = 20, noise_parameters = 0, complexity = 1, data_control = list(correlation = 0.3), outcome_prevalence = 0.30, maximum_achievable_cstatistic = 0.80, model = "glm", metric = "calibration_slope", target_performance = 0.85, n_reps_total = 1000, mean_or_assurance = "assurance" )
continuous_example:
set.seed(123) simulate_continuous( signal_parameters = 15, noise_parameters = 0, complexity = 1, data_control = list(correlation = 0.3), maximum_achievable_rsquared = 0.50, model = "lm", metric = "calibration_slope", target_performance = 0.95, n_reps_total = 1000, mean_or_assurance = "assurance" )
survival_example:
set.seed(123) simulate_survival( signal_parameters = 15, noise_parameters = 0, complexity = 1, data_control = list(correlation = 0.3), maximum_achievable_cindex = 0.70, baseline_hazard = 0.01, censoring_rate = 0.30, model = "coxph", metric = "calibration_slope", target_performance = 0.90, n_reps_total = 1000, mean_or_assurance = "assurance" )
custom_example: a linear model with three independent predictors and a
population R^2 of 0.5, targeting a calibration slope of 0.9 with
80% assurance. The search uses bounds of 25 to 1,000 participants, 1,000
replications and 30,000 test observations. See simulate_custom() for the
generating functions and executable call (seed 123).
simulate_binary(), simulate_continuous(),
simulate_survival(), simulate_custom()
binary_example
binary_example$min_n
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.