stab_single: Function to evaluate bootstrap predictor and model stability.

View source: R/stab_single.R

stab_singleR Documentation

Function to evaluate bootstrap predictor and model stability.

Description

stab_single Stability analysis of predictors and prediction models selected with the glm_bw.

Usage

stab_single(pobj, nboot = 20, p.crit = 0.05, start_model = TRUE)

Arguments

pobj

An object of class smods (single models), produced by a previous call to glm_bw.

nboot

A numerical scalar. Number of bootstrap samples to evaluate the stability. Default is 20.

p.crit

A numerical scalar. Used as P-value selection criterium during bootstrap model selection.

start_model

If TRUE the bootstrap evaluation takes place from the start model of object pobj, if FALSE the final model is used for the evaluation.

Details

The function evaluates predictor selection frequency in bootstrap samples. It uses as input an object of class smods as a result of a previous call to the glm_bw.

Value

A psfmi_stab object from which the following objects can be extracted: bootstrap inclusion (selection) frequency of each predictor bif, total number each predictor is included in the bootstrap samples as bif_total, percentage a predictor is selected in each bootstrap sample as bif_perc and number of times a prediction model is selected in the bootstrap samples as model_stab.

References

Heymans MW, van Buuren S. et al. Variable selection under multiple imputation using the bootstrap in a prognostic study. BMC Med Res Methodol. 2007;13:7-33.

Sauerbrei W, Schumacher M. A bootstrap resampling procedure for model building: application to the Cox regression model. Stat Med. 1992;11:2093–109.

Royston P, Sauerbrei W (2008) Multivariable model-building – a pragmatic approach to regression analysis based on fractional polynomials for modelling continuous variables. (2008). Chapter 8, Model Stability. Wiley, Chichester.

Heinze G, Wallisch C, Dunkler D. Variable selection - A review and recommendations for the practicing statistician. Biom J. 2018;60(3):431-449.

http://missingdatasolutions.rbind.io/

Examples

 model_lr <- glm_bw(formula = Radiation ~ Pain + factor(Satisfaction) + 
   rcs(Tampascale,3) + Age + Duration + JobControl + JobDemands + SocialSupport, 
   data=lbpmilr_dev, p.crit = 0.05)

## Not run: 
 stab_res <- stab_single(model_lr, start_model = TRUE, nboot=20, p.crit=0.05)
 stab_res$bif
 stab_res$bif_perc
 stab_res$model_stab

## End(Not run)


mwheymans/psfmi documentation built on June 30, 2023, 5:25 a.m.