find_bestfit {psm3mkv} | R Documentation |
Find the "best" survival regression from a list of model fits
Description
When there are multiple survival regressions fitted to the same endpoint and dataset, it is necessary to identify the preferred model. This function reviews the fitted regressions and selects that with the minimum Akaike or Bayesian Information Criterion (AIC, BIC), depending on user choice. Model fits must be all parametric or all splines.
Usage
find_bestfit(reglist, crit)
Arguments
reglist |
List of fitted survival regressions to an endpoint and dataset. |
crit |
Criterion to be used in selection of best fit, either "aic" (Akaike Information Criterion) or "bic" (Bayesian Information Criterion). |
Value
List of the single survival regression with the best fit.
Examples
bosonc <- create_dummydata("flexbosms")
# Parametric modeling
fits_par <- fit_ends_mods_par(bosonc)
find_bestfit(fits_par$ttp, "aic")
# Splines modeling
fits_spl <- fit_ends_mods_spl(bosonc)
find_bestfit(fits_spl$ttp, "bic")
[Package psm3mkv version 0.3.2 Index]