Bootstrap resample

109 views
Skip to first unread message

Jessica Koh

unread,
Jun 25, 2016, 2:08:02 AM6/25/16
to julia-stats
Hello,

I was trying to resample data with replacement by strata and with clusters. Maybe I haven't looked up enough, but the current bootstrap function does not handle strata and clusters. I had to code bootstrap resample code from scratch (which fortunately was not too difficult), but I thought it would be nice to have a function that resamples data with clusters and by strata. 

Is anyone aware of the existing julia library/function that does that? If not, where can I discuss this?

Thank you!

Diego Javier Zea

unread,
Jun 25, 2016, 8:00:56 PM6/25/16
to julia-stats
Hi Jessica,

The actual Bootstrap.jl package doesn't have that functionality (AFAIK), but maybe you can find useful the StratifiedRandomSum function in MLBase.jl.

Best

Diego Javier Zea

unread,
Jun 25, 2016, 8:04:45 PM6/25/16
to julia-stats
Aah! In the case you want sub-sampling inside a group, if your data is in a DataFrame you can use the by function, and call the sample function from it.

colint...@gmail.com

unread,
Jun 26, 2016, 9:07:58 PM6/26/16
to julia-stats
I don't know much about strata and cluster bootstrapping. It isn't related to dependent bootstraps is it? I wrote a package for dependent bootstraps, but haven't added it to metadata. Source code is here: https://github.com/colintbowers/DependentBootstrap.jl

Cheers,

Colin
Reply all
Reply to author
Forward
0 new messages