Skip to content

Commit

Permalink
Merge pull request #34 from juliangehring/develop
Browse files Browse the repository at this point in the history
Merge changes for v2.0.0 release
  • Loading branch information
juliangehring committed Sep 30, 2018
2 parents 718a243 + e6d6a11 commit eb49d14
Show file tree
Hide file tree
Showing 25 changed files with 314 additions and 302 deletions.
26 changes: 13 additions & 13 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- julia_version: 0.7
- julia_version: 1

platform:
- x64

matrix:
fast_finish: true

notifications:
- provider: Email
Expand All @@ -9,19 +16,12 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo();
Pkg.clone(pwd(), \"Bootstrap\"); Pkg.build(\"Bootstrap\")"
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"Bootstrap\")"
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ coverage:
project: true

flags:
julia_0_6:
julia_1_0:
joined: true

parsers:
Expand Down
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ language: julia

os:
- linux
- osx

julia:
- 0.6
- 0.7
- 1.0

matrix:
fast_finish: true

notifications:
email:
on_success: never
on_failure: change

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("Bootstrap"); Pkg.test("Bootstrap"; coverage=true)'

after_success:
- julia -e 'cd(Pkg.dir("Bootstrap")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder(), flags="julia_$(VERSION.major)_$(VERSION.minor)")'
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder(), flags="julia_$(VERSION.major)_$(VERSION.minor)")'
- julia -e 'using Pkg; Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
23 changes: 20 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Bootstrap.jl News and Changes

## Version 2.0.0

### Interface changes

- Put the function argument first in the signatures (#26): Changes the bootstrap signature to have the function argument come first: `bootstrap(statistic::Function, data, sampling)`. The old syntax has been deprecated and will be removed in a future version.
- Integrate better with StatsBase function names (#24): Integrates with the naming of the equivalent functions in StatsBase.jl: Renames ci to confint and se to stderror. The old function names have been deprecated, and will be supported until the next major release. The motivation for these change is outlined in #23.

### Changes

- Build the html documentation directly with Documenter (#28, #25)
- Support julia v0.7 and v1.0, drop support for julia v0.6 (#33)

### Support

- Requires julia 0.7 or v1.0


## Version 1.2.0

### New features
Expand All @@ -9,7 +26,7 @@

### Changes

- Transition tests from ``FactCheck`` to `Base.Test`.
- Transition tests from `FactCheck` to `Base.Test`.
- Introduces `StatsModels` as a new dependency which is now the new home of `Formula`s.
- Use vectorized function calls for `Distribution` functions.
- Removes the dependency on `Compat`.
Expand All @@ -25,13 +42,13 @@

### Changes

- Adds compatibility with julia 0.6 development versions, inc- Supports formula macros for DataFrame formulas (required for using [`DataFrames`](https://github.com/JuliaStats/DataFrames.jl/pull/1170) v0.9.0 or newer)
- Adds compatibility with julia 0.6 development versions, inc- Supports formula macros for DataFrame formulas (required for using [`DataFrames`](https://github.com/JuliaData/DataFrames.jl/pull/1170) v0.9.0 or newer)
- Fixes convergence errors of GLM models in parametric bootstrap test cases
- Modernise automated test and coverage setup (also thanks to [Tony Kelman](https://github.com/tkelman) for contributions)
- Improves the readme (also thanks to [Patrick Kofod Mogensen](https://github.com/pkofod) for contributions)
luding automated tests.
- Introduces `Compat` as a new dependency
- Supports formula macros for DataFrame formulas (required for using [`DataFrames`](https://github.com/JuliaStats/DataFrames.jl/pull/1170) v0.9.0 or newer)
- Supports formula macros for DataFrame formulas (required for using [`DataFrames`](https://github.com/JuliaData/DataFrames.jl/pull/1170) v0.9.0 or newer)
- Fixes convergence errors of GLM models in parametric bootstrap test cases
- Modernise automated test and coverage setup (also thanks to [Tony Kelman](https://github.com/tkelman) for contributions)
- Improves the readme (also thanks to [Patrick Kofod Mogensen](https://github.com/pkofod) for contributions)
Expand Down
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Bootstrapping is a widely applicable technique for statistical estimation.

![img](docs/src/bootstraps.png)
![img](docs/src/assets/logo.png)


# Functionality
## Functionality

- Bootstrapping statistics with different resampling methods:
- Random resampling with replacement (`BasicSampling`)
Expand All @@ -32,7 +32,7 @@ Bootstrapping is a widely applicable technique for statistical estimation.
Reports on package builds for all platforms and test coverage are collected on
the [package status page](status.md).

The package is under active development and uses [semantic versioning](http://semver.org/).
The package uses [semantic versioning](https://semver.org/).


## Installation
Expand All @@ -41,15 +41,16 @@ The `Bootstrap` package is part of the Julia ecosphere and the latest release
version can be installed with

```julia
using Pkg
Pkg.add("Bootstrap")
```

More details on packages and how to manage them can be found in the
[package section](http://docs.julialang.org/en/stable/manual/packages/#adding-and-removing-packages)
of the Julia documentation.
More details on packages and how to manage them can be found in the [package
section](https://docs.julialang.org/en/v1/stdlib/Pkg/) of the Julia
documentation.


# Examples
## Examples

This example illustrates the basic usage and cornerstone functions of the package.
More elaborate cases are covered in the documentation notebooks.
Expand All @@ -58,51 +59,53 @@ More elaborate cases are covered in the documentation notebooks.
using Bootstrap
```

Our observations `r` are sampled from a standard normal distribution.
Our observations in `some_data` are sampled from a standard normal distribution.

```julia
r = randn(100);
some_data = randn(100);
```

Let's bootstrap the standard deviation (`std`) of our data, based on 1000
resamples and with different bootstrapping approaches.

```julia
using Statistics # the `std` methods live here

n_boot = 1000

## basic bootstrap
bs1 = bootstrap(r, std, BasicSampling(n_boot))
bs1 = bootstrap(std, some_data, BasicSampling(n_boot))

## balanced bootstrap
bs2 = bootstrap(r, std, BalancedSampling(n_boot))
bs2 = bootstrap(std, some_data, BalancedSampling(n_boot))
```

We can explore the properties of the bootstrapped samples, for example estimated
bias and standard error of our statistic.
We can explore the properties of the bootstrapped samples, for example, the
estimated bias and standard error of our statistic.

```julia
bias(bs1)
se(bs1)
stderror(bs1)
```

Further, we can estimate confidence intervals for our statistic of interest,
based on the bootstrapped samples.
Furthermore, we can estimate confidence intervals (CIs) for our statistic of
interest, based on the bootstrapped samples.

```julia
## calculate 95% confidence intervals
cil = 0.95;

## basic CI
bci1 = ci(bs1, BasicConfInt(cil));
bci1 = confint(bs1, BasicConfInt(cil));

## percentile CI
bci2 = ci(bs1, PercentileConfInt(cil));
bci2 = confint(bs1, PercentileConfInt(cil));

## BCa CI
bci3 = ci(bs1, BCaConfInt(cil));
bci3 = confint(bs1, BCaConfInt(cil));

## Normal CI
bci4 = ci(bs1, NormalConfInt(cil));
bci4 = confint(bs1, NormalConfInt(cil));
```


Expand All @@ -113,8 +116,8 @@ is a comprehensive introduction into the topic. An extensive description of the
bootstrap is the focus of the book *Davison and Hinkley (1997):
[Bootstrap Methods and Their Application](http://statwww.epfl.ch/davison/BMA/)*.
Most of the methodology covered in the book is implemented in the
[boot](http://cran.r-project.org/web/packages/boot/index.html) package for the
[R programming language](http://www.r-project.org/). [More references](docs/src/references.md)
[boot](https://cran.r-project.org/web/packages/boot/index.html) package for the
[R programming language](https://www.r-project.org/). [More references](docs/src/references.md)
are listed in the documentation for further reading.


Expand Down
8 changes: 4 additions & 4 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
julia 0.6
StatsBase 0.15.0
Distributions 0.14.1
DataFrames 0.11.0
julia 0.7
StatsBase 0.24.0
Distributions 0.16.1
DataFrames 0.14.0
StatsModels 0.2.0
23 changes: 20 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
using Documenter
using Bootstrap

makedocs()
makedocs(
modules = [Bootstrap],
format = :html,
sitename = "Bootstrap.jl",
doctest = true,
checkdocs = :exports,
linkcheck = true,
html_disable_git = true, # disable source and edit links to github
html_canonical = "https://juliangehring.github.io/Bootstrap.jl/stable/",
pages = [
"Home" => "index.md",
"Library" => "library.md",
"Changelog" => "NEWS.md",
"License" => "LICENSE.md"
]
)

deploydocs(
repo = "github.com/juliangehring/Bootstrap.jl.git",
julia = "0.4",
deps = Deps.pip("mkdocs", "python-markdown-math", "pygments", "mkdocs-material")
julia = "1.0",
target = "build",
deps = nothing,
make = nothing
)
35 changes: 0 additions & 35 deletions docs/mkdocs.yml

This file was deleted.

File renamed without changes
11 changes: 3 additions & 8 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Motivation

```
{meta}
CurrentModule = Bootstrap
```

Bootstrapping is a widely applicable technique for statistical estimation.

![img](bootstraps.png)
![img](assets/logo.png)


# References

The [bootstrapping wikipedia article](https://en.wikipedia.org/wiki/Bootstrapping_(statistics)) is a comprehensive summary of the topic. An
extensive description of the bootstrap is the focus of the book *Davison and
Hinkley (1997): [Bootstrap Methods and Their Application](http://statwww.epfl.ch/davison/BMA/)*. Most of the
methodology covered in the book is implemented in the [boot](http://cran.r-project.org/web/packages/boot/index.html) package for the [R
programming language](http://www.r-project.org/).
methodology covered in the book is implemented in the [boot](https://cran.r-project.org/web/packages/boot/index.html) package for the [R
programming language](https://www.r-project.org/).
Loading

0 comments on commit eb49d14

Please sign in to comment.