boot_all_models: Refit all models several times on bootstrapped data

Description Usage Arguments Value See Also Examples

View source: R/fit_models.R

Description

This is a main function of this package. It refits each model multiple times after performing a non-parametric bootstrap on the data. This is used to ultimately derive confidence intervals on parameter estimates.

Usage

1
2
boot_all_models(models_list, data, n_boot = 40L, xtol_rel = 1e-07,
  maxtime = Inf, n_CPU = 2L, save_rda = FALSE, seed = 1L)

Arguments

models_list

The list of fitted models

data

The dataset to be used

n_boot

The number of bootstrapped dataset to generate and fit

xtol_rel

Tolerance parameter for nloptr

maxtime

Maximum time (in seconds) allowed for nloptr to fit; use Inf for best fit!

n_CPU

The number of CPU to use for fitting the bootstrapped datasets

save_rda

A boolean indicating whether saving the model as a *.rda object or not

seed

An integer giving the seed for the (pseudo-)random generator

Value

The list containing all the fits.

See Also

fit_all_models

Examples

1
2
3
4
5
## Warning: increase n_boot and maxtime for real fits!
Models_boot_test <- boot_all_models(models_list = Models[1:2],
                                    data = SurvEles_small,
                                    n_boot = 2L, maxtime = 1)
Models_boot_test

courtiol/SileR documentation built on May 16, 2020, 8:10 p.m.