Bootstrap | R Documentation |
Run a subset of the baseline model a number of times after resampling e.g. Hauls in each Stratum, EDUSs in each Stratum.
Bootstrap(
outputData,
projectPath,
BootstrapMethodTable = data.table::data.table(),
NumberOfBootstraps = 1L,
OutputProcesses = character(),
UseOutputData = FALSE,
NumberOfCores = 1L,
BaselineSeedTable = data.table::data.table()
)
outputData |
The output of the function from an earlier run. |
projectPath |
The path to the project to containing the baseline to bootstrap. |
BootstrapMethodTable |
A table of the columns ProcessName, ResampleFunction and Seed, where each row defines the resample function to apply to the output of the given process, and the seed to use in the resampling. The seed is used to draw one seed per bootstrap run using |
NumberOfBootstraps |
Integer: The number of bootstrap replicates. |
OutputProcesses |
A vector of the processes to save from each bootstrap replicate. |
UseOutputData |
Logical: Bootstrapping can be time consuming, and by setting |
NumberOfCores |
The number of cores to use for parallel processing. A copy of the project is created in tempdir() for each core, also when using only one core. Note that this will require disc space equivalent to the |
BaselineSeedTable |
A table of ProcessName and Seed, giving the seed to use for the Baseline processes that requires a Seed parameter. The seed is used to draw one seed per bootstrap run using |
A copy of the project is made for each core given by NumberOfCores
. In the case that NumberOfCores == 1, this is still done for safety.
Note that for acoustic-trawl survey estimates, if the AcousticPSUs of a Stratum have different assigned Hauls (not using the Stratum assignment method in DefineBioticAssignment
), there is a probability that none the assigned Hauls of an AcousticPSU are re-sampled in a bootstrap replicate. This will lead to missing acoustic density for that PSU for the target species, which will propagate throughout to the reports. This forces the use of RemoveMissingValues = TRUE, which implies some degree of under-estimation from what the estimate would be if none of the AcousticPSUs came out with missing acoustic density.
Note on limitatiton on NumberOfBootstraps
: All output requested data from all the bootstrap runs are accumulated in R memory, and written to one RData file at the end of the function, which effectively imposes a restriction of some hundred bootstrap runs for large StoX projects. Use Bootstrap
instead. Backwards compatibility sets the function Bootstrap to Bootstrap_3.6.0 for StoX projects saved in StoX 3.6.0 and older.
A BootstrapData
object, which is a list of the RstoxData DataTypes
and RstoxBase DataTypes
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.