bootstrapped_statistics: Compute boostrap statistics from a bootstrap run.

View source: R/bootstrapped_statistics.R

bootstrapped_statisticsR Documentation

Compute boostrap statistics from a bootstrap run.

Description

From a bootstrap run several statistics are computed. These are the model frequency, the bootstrap statistics of each parameter and, if the bootstrap is nonparametric, also the co-clustering probability of the input points. All the bootstrapped values are also returned. For the bootstrapped statistics the confidence intervals are returned for a required alpha value.

Usage

bootstrapped_statistics(
  x,
  bootstrap_results,
  bootstrap = "nonparametric",
  alpha = 0.025
)

Arguments

x

A MOBSTER fit.

bootstrap_results

The results of running function mobster_bootstrap

bootstrap

Type of boostrap: "parametric" or "nonparametric"

alpha

Alpha-level empirical CIs for the bootstrap distribution.

Value

A list with the bootstrapped values, the model frequency, the bootstraped statistics and the co-clustering probability - non-null only for nonparametric boostrap.

Examples

# Random small dataset
dataset = random_dataset(N = 200, seed = 123, Beta_variance_scaling = 100)
x = mobster_fit(dataset$data, auto_setup = 'FAST')

# Just 5 resamples of a nonparametric bootstrap run, disabling the parallel engine
options(easypar.parallel = FALSE)
boot_results = mobster_bootstrap(x$best, n.resamples = 5, auto_setup = 'FAST')

boot_stats = bootstrapped_statistics(x$best, boot_results)
print(boot_stats)

caravagnalab/mobster documentation built on March 25, 2023, 3:40 p.m.