bootstrap_moby: Example bootstrap results for the full Moby Dick data set

bootstrap_mobyR Documentation

Example bootstrap results for the full Moby Dick data set

Description

To explore the uncertainity in the model fit, this package provides a bootstrap function.

bootstrap_moby

The output from running 5000 bootstraps on the full Moby Dick data set (for a discrete power law) using the bootstrap function.

bootstrap_p_moby

The output from running 5000 bootstraps on the full Moby Dick data set (for a discrete power law) using the bootstrap_p function.

The bootstrap_moby values correspond to the first row of table 6.1 in the Clauset et al paper:

bootstrap_moby$gof

the K-S statistic

bootstrap_moby$bootstraps

a data frame for the optimal values from the bootstrapping procedure. Column 1: K-S, Column 2: xmin, Column 3: alpha. So standard deviation of column 2 and 3 is 2.2 and 0.033 (the paper gives 2 and 0.02 respectively).

The bootstrap_p_moby gives the p-value for the hypothesis test of whether the data follows a power-law. For this simulation study, we get a value of 0.43 (the paper gives 0.49).

Format

A list

Source

M. E. J. Newman, "Power laws, Pareto distributions and Zipf's law." Contemporary Physics 46, 323 (2005).

See Also

moby, bootstrap, bootstrap_p

Examples

## Generate the bootstrap_moby data set
## Not run: 
data(moby)
m = displ$new(moby)
bs = bootstrap(m, no_of_sims=5000, threads=4, seed=1)

## End(Not run)

#' ## Generate the bootstrap_p_moby data set
## Not run: 
bs_p = bootstrap_p(m, no_of_sims=5000, threads=4, seed=1)

## End(Not run)


poweRlaw documentation built on May 29, 2024, 10:01 a.m.