# New package DependentBootstrap

**URL:** <https://discourse.julialang.org/t/new-package-dependentbootstrap/312>\
**Category:** Statistics\
**Tags:** package, announcement\
**Created:** [November 15, 2016, 2:55am UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312 "2016-11-15T02:55:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Post date:** [November 15, 2016, 2:55am UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312/1 "2016-11-15T02:55:26Z")

</div>

Hi all,

A little under a year ago I wrote a package that implements various dependent bootstrap and block length selection methodologies in Julia, but didn’t register it. I’ve been using it for the past year, and based on that usage, over the last few days I’ve significantly simplified the package while upgrading it for v0.5. That is done now, and I just wanted to let you all know I’ve submitted a PR to the official METADATA so the package can be officially registered. I don’t know if anyone was previously using the unregistered version, but if so, be warned my upgrade includes a huge number of breaking changes. A final point - this is the first package I’ve registered for Julia. I followed the instructions in the v0.5 docs for registration, but if anyone spots something stupid I’ve done in the process please feel free to let me know here 🙂

If anyone wants a look in the meantime, the source is on github [here](https://github.com/colintbowers/DependentBootstrap.jl). The package implements the iid, stationary, moving block, circular block, and nonoverlapping block bootstrap procedures, and also implements the block length selection procedure from Politis and White (2004) including the correction in Patton, Politis, and White (2009), as well as the block length selection procedure from Paparoditis and Politis (2002).

I’ve also included code for the tapered block bootstrap, but it isn’t working to my satisfaction yet, and I don’t have time right now to track down why (so it just throws an error if you try to use it at the moment). If anyone is intimately familiar with method, please feel free to take a look!

Cheers all,

Colin

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [December 16, 2021, 6:58pm UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312/2 "2021-12-16T18:58:06Z")

</div>

I tried this command:

```julia
dbootconf(data, blocklength=5, bootmethod=:circular, flevel1=median, alpha=0.1)

```

and got the following message:

`ERROR: UndefVarError: median not defined`

The same thing happens if I used `mean` instead of `median`. If I omit the argument `flevel1` the function runs, I suppose with the default value which is `mean` according to the documentation.

I also tried `"mean"` and `"median"` but those did not work either.

What am I missiing?

Thanks for any help and for creating this potentially very useful package.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [December 16, 2021, 7:00pm UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312/3 "2021-12-16T19:00:22Z")

</div>

I found out I could make the function work with `Statistics.median` instead of just `median`.

---

<div class="post-metadata">

**Author:** ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Post date:** [December 17, 2021, 4:09am UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312/4 "2021-12-17T04:09:47Z")

</div>

Yeah, `mean` and `median` used to be part of the default set of packages loaded when you started Julia, but a few versions back they were moved to the `Statistics` module. So if you do `using Statistics` before the `dbootconf` function call then you should be able to just write `mean` or `median`. I’ll update the docs to reflect this. Thanks for bringing it to my attention.
