bootstrap {bnstruct} | R Documentation

## Perform bootstrap.

### Description

Create a list of `num.boots` samples of the original dataset.

### Usage

    bootstrap(object, num.boots = 100, seed = 0, imputation = FALSE,
      k.impute = 10)

    ## S4 method for signature 'BNDataset'
    bootstrap(object, num.boots = 100, seed = 0,
      imputation = FALSE, k.impute = 10)

### Arguments

`object` | the `BNDataset` object.
`num.boots` | number of sampled datasets for bootstrap.
`seed` | random seed.
`imputation` | `TRUE` if imputation has to be performed. Default is `FALSE`.
`k.impute` | number of neighbours to be used; for discrete variables we use mode, for continuous variables the median value is instead taken (useful only if imputation == TRUE).

### Examples

    ## Not run:
    dataset <- BNDataset("file.data", "file.header")
    dataset <- bootstrap(dataset, num.boots = 1000)

    ## End(Not run)

[Package bnstruct version 1.0.6 Index]