Skip to content

Commit 70802a9

Browse files
PR for #22: deploy shiny (#23)
* new shiny page for #22 * finishes for #22 * changes behavior for `.mat` files for #22 * Adds pointer to readme for #22 * Update shiny/app.py Co-authored-by: jmshapir <[email protected]> * Update shiny/app.py Co-authored-by: jmshapir <[email protected]> * changes for interface for #22 * Update shiny/app.py Co-authored-by: jmshapir <[email protected]> * reverts version for Bootstrapreport for #22 * boosts compatibility with matlab for #22 * extends compatibility to RDATA for #22 * fix for #22 * Fix for #23 * overhaul for #22 * Wording change for #23 @MosesStewart fyi * added stable link to readme for #22 * Tidying for #22 * Version for #23 --------- Co-authored-by: jmshapir <[email protected]>
1 parent a971040 commit 70802a9

14 files changed

+1765
-607
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ Documentation:
88
* [Methods](./BootstrapReport.lyx)
99
* [Examples](./examples/)
1010

11+
WebApp:
12+
* [ShinyBootstrapReport](https://jmslab.shinyapps.io/BootstrapReport)
13+
1114
Citation:
1215
* Andrews, Isaiah and Jesse M. Shapiro. "Bootstrap Diagnostics for Irregular Estimators." 2023. Working Paper.

examples/_generate_example_data.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ def generate_example_dataset(name):
3737
bootstrap replicates, or 'gamma' for gamma mean bootstrap replicates
3838
:return: Replicates and estimate for the data
3939
"""
40-
np.random.seed(10042002)
4140
rng = np.random.default_rng(seed = 10042002)
4241
if name == 'normal':
4342
num_rep, mean, std = 100, 0.74, 0.086
44-
raw_data = norm.rvs(size = num_rep, loc = mean, scale = np.sqrt(num_rep) * std)
43+
raw_data = rng.normal(size = num_rep, loc = mean, scale = np.sqrt(num_rep) * std)
4544
replicates = get_replicates(raw_data)
4645
estimate = np.median(raw_data)
4746
elif name == 'gamma':
4847
num_rep, variance, mean = 499, 0.186, 2.189
49-
raw_data = gamma.rvs((mean**2)/(variance * num_rep), scale = (variance * num_rep)/mean, size = 50)
48+
raw_data = rng.gamma(shape = (mean**2)/(variance * num_rep), scale = (variance * num_rep)/mean, size = 499)
5049
replicates = get_replicates(raw_data, num_rep = num_rep)
51-
estimate = np.average(raw_data, weights = uniform.rvs(size = 50))
50+
estimate = np.average(raw_data, weights = rng.uniform(size = 499))
5251
elif name == 'ratio':
5352
num_rep, numer_std, mean = 1000, 1, 0
5453
replicates = rng.normal(size = num_rep, loc = mean, scale = numer_std)/ \

examples/gamma_estimate.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
estimate,std_err
2-
3.329153904463066,2.0256286444979983
2+
1.8450286322049927,0.3898786195682134

0 commit comments

Comments
 (0)