Bootstrap sampling

draws `bootstat`

= bootstrp(`nboot`

,`bootfun`

,`d`

)`nboot`

bootstrap data samples from `d`

,
computes statistics on each sample using the function `bootfun`

, and
returns the results in `bootstat`

. The `bootstrp`

function creates each bootstrap sample by sampling with replacement from the rows of
`d`

. Each row of the output argument `bootstat`

contains the results of applying `bootfun`

to one bootstrap
sample.

draws `bootstat`

= bootstrp(`nboot`

,`bootfun`

,d1,...,dN)`nboot`

bootstrap samples from the data in
`dl,...,dN`

. The nonscalar data arguments in `dl,...,dN`

must have the same number of rows, `n`

. The `bootstrp`

function creates each bootstrap sample by sampling with replacement from the indices
`1:n`

and selecting the corresponding rows of the nonscalar
`dl,...,dN`

. The function passes the sample of nonscalar data and the
unchanged scalar data arguments in `dl,...,dN`

to
`bootfun`

.

specifies options using one or more name-value pair arguments in addition to any of the
input argument combinations in previous syntaxes. For example, you can add observation
weights to your data or compute bootstrap iterations in parallel.`bootstat`

= bootstrp(___,`Name,Value`

)

`[`

also returns `bootstat`

,`bootsam`

] = bootstrp(___)`bootsam`

, an
`n`

-by-`nboot`

matrix of bootstrap sample indices,
where `n`

is the number of rows in the original, nonscalar data. Each
column in `bootsam`

corresponds to one bootstrap sample and contains the
row indices of the values drawn from the nonscalar data to create that sample.

To get the bootstrap sample indices without applying a function to the samples, set
`bootfun`

to empty (`[]`

).

`RandStream`

| `bootci`

| `histogram`

| `ksdensity`

| `parfor`

| `random`

| `randsample`

| `statget`

| `statset`