Learn R Programming

NeuralEstimators (version 0.2.0)

bootstrap: bootstrap

Description

Compute bootstrap estimates from a neural point estimator

Usage

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

Value

d × B matrix, where d is the dimension of the parameter vector

Arguments

estimator

a neural point 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 times (non-parametric bootstrap)

B

number of non-parametric bootstrap samples

blocks

integer vector specifying the blocks in non-parameteric bootstrap. 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)

use_gpu

boolean indicating whether to use the GPU if it is available