bootstrap {NeuralEstimators}R Documentation

bootstrap

Description

Compute bootstrap estimates from a neural estimator

Usage

bootstrap(estimator, Z, B = 400, blocks = NULL, use_gpu = TRUE)

Arguments

estimator

a neural estimator

Z

either a list of data sets simulated conditionally on the fitted parameters (parametric bootstrap); or a single observed data set containing independent replicates, which will be sampled with replacement B (non-parametric bootstrap)

B

number of non-parametric bootstrap estimates (default 400)

blocks

integer vector specifying the blocks in non-parameteric bootstrap (default NULL). For example, with 5 replicates, the first two corresponding to block 1 and the remaining three corresponding to block 2, blocks should be c(1,1,2,2,2). The bootstrap sampling algorithm aims to produce bootstrap data sets that are of a similar size to Z, but this can only be achieved exactly if all blocks are equal in length.

use_gpu

a boolean indicating whether to use the GPU if it is available (default TRUE)

Value

p × B matrix, where p is the number of parameters in the model and B is the number of bootstrap samples


[Package NeuralEstimators version 0.1.0 Index]