diff --git a/docs/copying.html b/docs/copying.html index 41645610..4778735f 100644 --- a/docs/copying.html +++ b/docs/copying.html @@ -3,7 +3,7 @@ - + diff --git a/docs/description.json b/docs/description.json index ad5e1bd4..fcb3e2fd 100644 --- a/docs/description.json +++ b/docs/description.json @@ -1,14 +1,14 @@ { "generator": "generate_html", "generator_version": "0.3.3", - "date_generated": "2024-04-22", + "date_generated": "2024-04-24", "package": { "name": "statistics-resampling", "version": "5.5.9", "description": "The statistics-resampling package is an Octave package and Matlab toolbox that can be used to perform a wide variety of statistics tasks using non-parametric resampling methods. In particular, the functions included can be used to estimate bias, uncertainty (standard errors and confidence intervals), prediction error, and calculate p-values for null hypothesis significance tests. Variations of the resampling methods are included that improve the accuracy of the statistics for small samples and samples with complex dependence structures.", "shortdescription": "The statistics-resampling package is an Octave package and Matlab toolbox that can be used to perform a wide variety of statistics tasks using non-parametric resampling methods", - "date": "2024-04-21", + "date": "2024-04-24", "title": "A statistics package with a variety of resampling tools", "author": "Andrew Penn ", "maintainer": "Andrew Penn ", diff --git a/docs/function/boot.html b/docs/function/boot.html index 28650bd2..32768053 100644 --- a/docs/function/boot.html +++ b/docs/function/boot.html @@ -3,7 +3,7 @@ - + @@ -118,15 +118,15 @@

Demonstration 1

Columns 1 through 11: - 3 3 1 2 1 3 2 3 2 1 1 - 3 3 1 2 1 1 1 2 3 1 1 - 3 2 2 3 2 2 2 1 3 1 2 + 3 2 1 2 3 3 3 3 2 3 1 + 1 1 1 3 3 2 2 3 1 1 1 + 2 3 3 2 2 1 3 1 1 1 3 Columns 12 through 20: - 3 2 1 3 3 2 2 2 3 - 2 1 2 3 3 1 1 3 1 - 3 2 3 2 1 1 1 3 2 + 2 3 1 2 2 1 1 2 2 + 3 3 2 2 2 2 2 3 1 + 3 1 2 1 1 3 3 1 2

Demonstration 2

@@ -141,15 +141,15 @@

Demonstration 2

Columns 1 through 11: - 3 3 1 3 3 2 2 1 1 2 1 - 2 1 2 3 3 2 3 3 1 3 1 - 3 3 1 2 1 2 2 1 1 2 3 + 2 3 1 3 3 2 2 3 1 2 3 + 3 3 1 2 3 1 2 1 1 2 3 + 3 3 1 3 1 1 3 1 2 2 1 Columns 12 through 20: - 1 3 3 1 3 1 2 2 1 - 1 3 3 2 3 1 2 2 1 - 2 2 1 2 2 3 2 3 1 + 1 2 1 1 2 3 2 2 3 + 1 3 1 2 3 1 2 1 2 + 2 2 3 2 3 3 1 1 2

Demonstration 3

diff --git a/docs/function/boot1way.html b/docs/function/boot1way.html index dbfcbc78..e63d894d 100644 --- a/docs/function/boot1way.html +++ b/docs/function/boot1way.html @@ -3,7 +3,7 @@ - + @@ -55,11 +55,11 @@

boot1way

'boot1way (..., 'bootfun', BOOTFUN)' also specifies BOOTFUN: the function calculated on the original sample and the bootstrap resamples. BOOTFUN must be either a: - o function handle or anonymous function, - o string of function name, or + o function handle, function name or an anonymous function, + o string of a function name, or o a cell array where the first cell is one of the above function definitions and the remaining cells are (additional) input arguments - to that function (other than the data arguments). + to that function (after the data arguments). In all cases, BOOTFUN must take DATA for the initial input argument(s). BOOTFUN must calculate a statistic representative of the finite data sample; it should NOT be an estimate of a population parameter (unless @@ -529,7 +529,7 @@

Demonstration 7

----------------------------------------------------------------------------- | Comparison | Test # | Ref # | Difference | t | p | |------------|------------|------------|------------|------------|----------| -| 1 | 2 | 1 | +0.6032 | +1.39 | .230 | +| 1 | 2 | 1 | +0.08697 | +0.17 | .858 | ----------------------------------------------------------------------------- | GROUP # | GROUP label | N | @@ -574,7 +574,7 @@

Demonstration 8

----------------------------------------------------------------------------- | Comparison | Test # | Ref # | Difference | t | p | |------------|------------|------------|------------|------------|----------| -| 1 | 2 | 1 | +0.1395 | +0.19 | .779 | +| 1 | 2 | 1 | -0.08836 | -0.13 | .837 | ----------------------------------------------------------------------------- | GROUP # | GROUP label | N | diff --git a/docs/function/bootbayes.html b/docs/function/bootbayes.html index 071ea5ab..c584c442 100644 --- a/docs/function/bootbayes.html +++ b/docs/function/bootbayes.html @@ -3,7 +3,7 @@ - + @@ -191,7 +191,7 @@

Demonstration 1

Posterior Statistics: original bias median stdev CI_lower CI_upper - +184.5 -0.02210 +184.5 1.240 +182.1 +186.9 + +184.5 -0.02727 +184.5 1.310 +182.1 +187.3

Demonstration 2

@@ -228,8 +228,8 @@

Demonstration 2

Posterior Statistics: original bias median stdev CI_lower CI_upper - +175.5 +0.03532 +175.5 2.384 +171.1 +180.3 - +0.1904 -0.001074 +0.1909 0.07912 +0.04160 +0.3442 + +175.5 +0.01959 +175.5 2.479 +170.9 +180.3 + +0.1904 -0.001474 +0.1927 0.08174 +0.03816 +0.3526

Package: statistics-resampling

diff --git a/docs/function/bootcdf.html b/docs/function/bootcdf.html index a3475e3c..f2b46dae 100644 --- a/docs/function/bootcdf.html +++ b/docs/function/bootcdf.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/bootci.html b/docs/function/bootci.html index 7010e145..c19c748c 100644 --- a/docs/function/bootci.html +++ b/docs/function/bootci.html @@ -3,7 +3,7 @@ - + @@ -186,8 +186,8 @@

Demonstration 1

Produces the following output

ci =
 
-       23.616
-       34.358
+ 23.895 + 34.598

Demonstration 2

@@ -206,8 +206,8 @@

Demonstration 2

Produces the following output

ci =
 
-       23.975
-       34.269
+ 24 + 34.118

Demonstration 3

@@ -227,8 +227,8 @@

Demonstration 3

Produces the following output

ci =
 
-        25.04
-       36.477
+ 24.924 + 37.101

Demonstration 4

@@ -247,8 +247,8 @@

Demonstration 4

Produces the following output

ci =
 
-       96.629
-       235.91
+ 99.352 + 237.73

Demonstration 5

@@ -267,8 +267,8 @@

Demonstration 5

Produces the following output

ci =
 
-       117.01
-       260.73
+ 116.14 + 265.21

Demonstration 6

@@ -288,8 +288,8 @@

Demonstration 6

Produces the following output

ci =
 
-       108.55
-       297.71
+ 114.58 + 298.41

Demonstration 7

@@ -309,8 +309,8 @@

Demonstration 7

Produces the following output

ci =
 
-       111.53
-       268.13
+ 110.15 + 272.46

Demonstration 8

@@ -331,8 +331,8 @@

Demonstration 8

Produces the following output

ci =
 
-      0.50501
-      0.86333
+ 0.51805 + 0.85978

Demonstration 9

@@ -439,13 +439,13 @@

Demonstration 9

Produces the following output

ans =
 
-       -16.69      -20.555      -12.325
-      -11.721      -15.104       -7.907
-      -8.0606      -11.244      -4.3564
-      0.10476    -0.081023      0.28225
-     0.010336   -0.0032993     0.022647
-      0.06452     0.033083     0.095608
-    0.0016638   0.00017173    0.0031554
+ -16.69 -20.545 -12.638 + -11.721 -15.163 -8.0707 + -8.0606 -11.384 -4.5899 + 0.10476 -0.072888 0.28242 + 0.010336 -0.0020222 0.023297 + 0.06452 0.032508 0.094107 + 0.0016638 0.0002219 0.0030662

Demonstration 10

@@ -466,8 +466,8 @@

Demonstration 10

Produces the following output

ci =
 
-     -0.68659     -0.66985
-      0.33107      0.40462
+ -0.16358 -0.84894 + 0.71954 0.45924

Demonstration 11

diff --git a/docs/function/bootclust.html b/docs/function/bootclust.html index 6e18cbd7..dd776eea 100644 --- a/docs/function/bootclust.html +++ b/docs/function/bootclust.html @@ -3,7 +3,7 @@ - + @@ -55,11 +55,11 @@

bootclust

'bootclust (DATA, NBOOT, BOOTFUN)' also specifies BOOTFUN: the function calculated on the original sample and the bootstrap resamples. BOOTFUN must be either a: - <> function handle or anonymous function, - <> string of function name, or + <> function handle, function name or an anonymous function, + <> string of a function name, or <> a cell array where the first cell is one of the above function definitions and the remaining cells are (additional) input arguments - to that function (other than the data arguments). + to that function (after the data arguments). In all cases BOOTFUN must take DATA for the initial input argument(s). BOOTFUN can return a scalar or any multidimensional numeric variable, but the output will be reshaped as a column vector. BOOTFUN must @@ -187,11 +187,11 @@

Demonstration 1

Number of resamples: 1999 Number of data rows in each block: 1 Confidence interval (CI) type: Expanded bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 95% (1.4%, 97.8%) + Nominal coverage (and the percentiles used): 95% (1.4%, 97.7%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +29.65 -3.553e-15 +2.563 +23.66 +34.69 + +29.65 +1.776e-14 +2.573 +23.98 +34.67

Demonstration 2

@@ -219,11 +219,11 @@

Demonstration 2

Resampling method: Balanced, bootstrap cluster resampling Number of resamples: 1999 Confidence interval (CI) type: Expanded bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 95% (1.1%, 98.7%) + Nominal coverage (and the percentiles used): 95% (1.2%, 98.9%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +29.65 -0.04052 +2.932 +22.75 +35.92 + +29.65 -0.03233 +2.892 +23.14 +35.97

Demonstration 3

@@ -254,7 +254,7 @@

Demonstration 3

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -6.974 +42.22 +98.20 +237.8 + +171.5 -6.406 +41.53 +99.13 +234.2

Demonstration 4

@@ -286,7 +286,7 @@

Demonstration 4

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -9.505 +34.01 +103.7 +216.4 + +171.5 -8.995 +32.96 +106.1 +215.3

Demonstration 5

@@ -312,11 +312,11 @@

Demonstration 5

Number of resamples: 1999 Number of data rows in each block: 1 Confidence interval (CI) type: Bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 90% (13.6%, 99.0%) + Nominal coverage (and the percentiles used): 90% (12.1%, 98.7%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -7.062 +42.46 +117.0 +266.9 + +171.5 -6.855 +41.69 +115.4 +263.0

Demonstration 6

@@ -343,11 +343,11 @@

Demonstration 6

Resampling method: Balanced, bootstrap cluster resampling Number of resamples: 1999 Confidence interval (CI) type: Bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 90% (14.0%, 98.9%) + Nominal coverage (and the percentiles used): 90% (14.6%, 98.9%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -9.645 +33.49 +125.0 +231.2 + +171.5 -9.973 +33.87 +125.3 +232.9

Demonstration 7

@@ -376,8 +376,8 @@

Demonstration 7

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +0.1027 +0.006838 +0.2525 -0.2972 +0.5411 - -0.1219 +0.01000 +0.1683 -0.3815 +0.1661 + +0.04006 -0.01294 +0.2088 -0.3053 +0.3697 + +0.1410 +0.0005343 +0.1810 -0.1187 +0.4558

Demonstration 8

@@ -406,8 +406,8 @@

Demonstration 8

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +0.1088 +0.01781 +0.3219 -0.2837 +0.8343 - -0.2450 -0.01102 +0.3331 -0.8124 +0.2832 + -0.1446 +0.004816 +0.2655 -0.6247 +0.2453 + -0.3187 +0.02024 +0.2593 -0.7709 +0.08425

Demonstration 9

@@ -434,11 +434,11 @@

Demonstration 9

Resampling method: Balanced, bootstrap cluster resampling Number of resamples: 1999 Confidence interval (CI) type: Bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 95% (1.8%, 96.8%) + Nominal coverage (and the percentiles used): 95% (2.0%, 97.0%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +0.7764 -0.02382 +0.1438 +0.4050 +0.9963 + +0.7764 -0.02443 +0.1439 +0.4074 +0.9985

Demonstration 10

diff --git a/docs/function/bootknife.html b/docs/function/bootknife.html index edc8bc17..6f209a33 100644 --- a/docs/function/bootknife.html +++ b/docs/function/bootknife.html @@ -3,7 +3,7 @@ - + @@ -59,11 +59,11 @@

bootknife

'bootknife (DATA, NBOOT, BOOTFUN)' also specifies BOOTFUN: the function calculated on the original sample and the bootstrap resamples. BOOTFUN must be either a: - <> function handle or anonymous function, - <> string of function name, or + <> function handle, function name or an anonymous function, + <> string of a function name, or <> a cell array where the first cell is one of the above function definitions and the remaining cells are (additional) input arguments - to that function (other than the data arguments). + to that function (after the data arguments). In all cases BOOTFUN must take DATA for the initial input argument(s). BOOTFUN can return a scalar or any multidimensional numeric variable, but the output will be reshaped as a column vector. BOOTFUN must @@ -221,11 +221,11 @@

Demonstration 1

Number of resamples (outer): 1999 Number of resamples (inner): 0 Confidence interval (CI) type: Expanded bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 95% (1.3%, 97.1%) + Nominal coverage (and the percentiles used): 95% (1.3%, 97.2%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +29.65 +1.776e-14 +2.748 +23.27 +34.66 + +29.65 -6.395e-14 +2.596 +23.75 +34.46

Demonstration 2

@@ -251,11 +251,11 @@

Demonstration 2

Number of resamples (outer): 1999 Number of resamples (inner): 199 Confidence interval (CI) type: Calibrated percentile - Nominal coverage (and the percentiles used): 95% (1.2%, 97.1%) + Nominal coverage (and the percentiles used): 95% (1.5%, 97.5%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +29.65 -1.421e-14 +2.630 +23.35 +34.44 + +29.65 +9.237e-14 +2.646 +23.74 +34.52

Demonstration 3

@@ -282,11 +282,11 @@

Demonstration 3

Number of resamples (outer): 1999 Number of resamples (inner): 199 Confidence interval (CI) type: Calibrated percentile - Nominal coverage (and the percentiles used): 95% (1.8%, 98.0%) + Nominal coverage (and the percentiles used): 95% (2.1%, 98.2%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +30.86 +0.01608 +2.904 +24.46 +37.09 + +30.86 -0.02584 +3.005 +24.55 +37.15

Demonstration 4

@@ -317,7 +317,7 @@

Demonstration 4

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -6.607 +41.95 +96.13 +234.9 + +171.5 -7.325 +41.95 +97.15 +234.6

Demonstration 5

@@ -343,11 +343,11 @@

Demonstration 5

Number of resamples (outer): 1999 Number of resamples (inner): 0 Confidence interval (CI) type: Bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 90% (12.3%, 98.7%) + Nominal coverage (and the percentiles used): 90% (12.8%, 98.8%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -6.707 +42.55 +114.9 +263.0 + +171.5 -6.887 +42.48 +115.3 +266.6

Demonstration 6

@@ -378,7 +378,7 @@

Demonstration 6

Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -7.775 +46.06 +81.49 +254.0 + +171.5 -7.455 +45.00 +82.29 +254.4

Demonstration 7

@@ -404,11 +404,11 @@

Demonstration 7

Number of resamples (outer): 1999 Number of resamples (inner): 199 Confidence interval (CI) type: Calibrated percentile - Nominal coverage (and the percentiles used): 90% (11.3%, 99.5%) + Nominal coverage (and the percentiles used): 90% (11.8%, 99.5%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +171.5 -6.950 +45.85 +112.4 +286.7 + +171.5 -7.452 +43.30 +114.6 +270.2

Demonstration 8

@@ -440,8 +440,8 @@

Demonstration 8

Bootstrap Statistics: original bias std_error CI_lower CI_upper - -0.01430 -0.01987 +0.2040 -0.3482 +0.3212 - +0.3787 -0.02950 +0.2687 -0.1123 +0.7701 + +0.1109 -0.001258 +0.2044 -0.3091 +0.3956 + -0.01708 -0.03366 +0.1871 -0.3492 +0.2199

Demonstration 9

@@ -468,11 +468,11 @@

Demonstration 9

Number of resamples (outer): 1999 Number of resamples (inner): 0 Confidence interval (CI) type: Bias-corrected and accelerated (BCa) - Nominal coverage (and the percentiles used): 95% (0.5%, 93.5%) + Nominal coverage (and the percentiles used): 95% (0.6%, 94.2%) Bootstrap Statistics: original bias std_error CI_lower CI_upper - +0.7764 -0.005884 +0.1383 +0.3279 +0.9475 + +0.7764 -0.005528 +0.1371 +0.3250 +0.9515

Demonstration 10

@@ -572,27 +572,7 @@

Demonstration 10

end % Please be patient, the calculations will be completed soon... -

Produces the following output

-
Summary of nonparametric bootstrap estimates of bias and precision
-******************************************************************************
-
-Bootstrap settings: 
- Function: @(X, miles) mnrfit (X, miles, 'model', 'ordinal')
- Resampling method: Balanced, bootknife resampling 
- Number of resamples (outer): 1999 
- Number of resamples (inner): 0 
- Confidence interval (CI) type: Bias-corrected and accelerated (BCa) 
- Nominal coverage: 95%
-
-Bootstrap Statistics: 
- original     bias         std_error    CI_lower     CI_upper  
- -16.69       -0.5288      +2.172       -20.57       -12.23     
- -11.72       -0.3718      +1.899       -15.22       -7.963     
- -8.061       -0.2694      +1.802       -11.54       -4.523     
- +0.1048      +0.005695    +0.09224     -0.07161     +0.2895    
- +0.01034     +0.0006952   +0.006594    -0.001685    +0.02404   
- +0.06452     +0.002374    +0.01680     +0.03061     +0.09619   
- +0.001664    +7.392e-06   +0.0007521   +4.330e-05   +0.003043
+

gives an example of how 'bootknife' is used.

Demonstration 11

diff --git a/docs/function/bootlm.html b/docs/function/bootlm.html index 7e249247..0b845f23 100644 --- a/docs/function/bootlm.html +++ b/docs/function/bootlm.html @@ -3,7 +3,7 @@ - + @@ -146,9 +146,10 @@

bootlm

and returned from bootlm when the METHOD is 'wild'. Since the wild bootstrap method here (based on Webb's 6-point distribution) imposes symmetry on the sampling of the residuals, we recommend - using 'wild' bootstrap for hypothesis testing, and instead use - 'bayesian' bootstrap with the 'auto' prior setting (see below) - for estimation of precision/uncertainty (e.g. credible intervals). + using 'wild' bootstrap for (two-sided) hypothesis tests, and + instead use 'bayesian' bootstrap with the 'auto' prior setting + (see below) for estimation of precision/uncertainty (e.g. credible + intervals). '[...] = bootlm (Y, GROUP, ..., 'method', 'bayesian', 'prior', PRIOR)' @@ -554,7 +555,7 @@

Demonstration 1

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -female - male +10.80 -8.747 +30.35 .245 +female - male +10.80 -8.735 +30.33 .245 MODEL FORMULA (based on Wilkinson's notation): @@ -565,9 +566,9 @@

Demonstration 1

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -female - male +0.7432 -0.4083 +1.958 +female - male +0.7576 -0.4246 +1.936 -Cohen's d [95% CI] = 0.74 [-0.41, 1.96] (N = 11) +Cohen's d [95% CI] = 0.76 [-0.42, 1.94] (N = 11) MODEL FORMULA (based on Wilkinson's notation): @@ -578,8 +579,8 @@

Demonstration 1

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -male +44.20 +32.28 +53.37 5 -female +55.00 +42.61 +68.08 6 +male +44.20 +32.70 +53.52 5 +female +55.00 +42.40 +68.12 6

and the following figure

@@ -642,7 +643,7 @@

Demonstration 2

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -after - before +1.460 +0.6496 +2.270 .002 +after - before +1.460 +0.6450 +2.275 .002 MODEL FORMULA (based on Wilkinson's notation): @@ -653,9 +654,9 @@

Demonstration 2

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -after - before +2.381 +1.139 +3.545 +after - before +2.385 +1.169 +3.545 -Cohen's d [95% CI] = 2.38 [1.14, 3.54] (N = 10) +Cohen's d [95% CI] = 2.38 [1.17, 3.54] (N = 10) MODEL FORMULA (based on Wilkinson's notation): @@ -666,8 +667,8 @@

Demonstration 2

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -before +4.560 +4.104 +5.005 5 -after +6.020 +5.589 +6.476 5 +before +4.560 +4.095 +4.980 5 +after +6.020 +5.565 +6.450 5

and the following figure

@@ -722,9 +723,9 @@

Demonstration 3

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -st - al1 +7.000 +3.870 +10.18 <.001 -st - al2 +5.000 +2.565 +7.486 <.001 -al1 - al2 -2.000 -4.909 +0.9341 .169 +st - al1 +7.000 +3.835 +10.16 <.001 +st - al2 +5.000 +2.531 +7.443 <.001 +al1 - al2 -2.000 -4.883 +0.8893 .175 MODEL FORMULA (based on Wilkinson's notation): @@ -735,9 +736,9 @@

Demonstration 3

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -st +84.00 +82.23 +85.74 8 -al1 +77.00 +74.86 +79.39 6 -al2 +79.00 +77.74 +80.45 6 +st +84.00 +82.13 +85.71 8 +al1 +77.00 +74.99 +79.35 6 +al2 +79.00 +77.78 +80.45 6

and the following figure

@@ -800,9 +801,9 @@

Demonstration 4

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -1 - 2 -2.000 -2.718 -1.284 <.001 -1 - 5 -3.200 -3.870 -2.535 <.001 -2 - 5 -1.200 -2.081 -0.3095 .012 +1 - 2 -2.000 -2.730 -1.287 <.001 +1 - 5 -3.200 -3.860 -2.526 <.001 +2 - 5 -1.200 -2.105 -0.3130 .014 MODEL FORMULA (based on Wilkinson's notation): @@ -813,9 +814,9 @@

Demonstration 4

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -1 +11.00 +10.64 +11.35 10 -2 +13.00 +12.52 +13.49 10 -5 +14.20 +13.76 +14.66 10 +1 +11.00 +10.66 +11.37 10 +2 +13.00 +12.51 +13.47 10 +5 +14.20 +13.76 +14.65 10

and the following figure

@@ -887,12 +888,12 @@

Demonstration 5

name coeff CI_lower CI_upper p-val -------------------------------------------------------------------------------- -(Intercept) +5.667 +4.792 +6.541 <.001 -brands_1 -1.333 -1.903 -0.7632 .012 -brands_2 -2.167 -3.123 -1.210 <.001 -popper_1 +1.167 +0.5999 +1.733 .016 -brands:popper_1 -0.3333 -1.075 +0.4080 .331 -brands:popper_2 -0.1667 -1.254 +0.9209 .730 +(Intercept) +5.667 +4.802 +6.532 <.001 +brands_1 -1.333 -1.894 -0.7729 .012 +brands_2 -2.167 -3.121 -1.212 <.001 +popper_1 +1.167 +0.6003 +1.733 .016 +brands:popper_1 -0.3333 -1.077 +0.4101 .333 +brands:popper_2 -0.1667 -1.237 +0.9037 .728 MODEL FORMULA (based on Wilkinson's notation): @@ -903,9 +904,9 @@

Demonstration 5

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -Gourmet - National +1.500 +1.129 +1.871 <.001 -Gourmet - Generic +2.250 +1.719 +2.781 <.001 -National - Generic +0.7500 +0.2168 +1.283 .010 +Gourmet - National +1.500 +1.124 +1.876 <.001 +Gourmet - Generic +2.250 +1.706 +2.794 <.001 +National - Generic +0.7500 +0.2000 +1.300 .011 MODEL FORMULA (based on Wilkinson's notation): @@ -916,9 +917,9 @@

Demonstration 5

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -Gourmet +6.250 +6.056 +6.435 6 -National +4.750 +4.555 +4.930 6 -Generic +4.000 +3.664 +4.316 6 +Gourmet +6.250 +6.068 +6.445 6 +National +4.750 +4.564 +4.940 6 +Generic +4.000 +3.683 +4.327 6 MODEL FORMULA (based on Wilkinson's notation): @@ -929,7 +930,7 @@

Demonstration 5

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- -oil - air -1.000 -1.391 -0.6094 <.001 +oil - air -1.000 -1.380 -0.6196 <.001 MODEL FORMULA (based on Wilkinson's notation): @@ -940,8 +941,8 @@

Demonstration 5

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -oil +4.500 +4.316 +4.690 9 -air +5.500 +5.312 +5.680 9 +oil +4.500 +4.313 +4.680 9 +air +5.500 +5.321 +5.697 9

and the following figure

@@ -1824,8 +1825,8 @@

Demonstration 13

name mean CI_lower CI_upper p-adj -------------------------------------------------------------------------------- A - B -6.650 -13.50 +0.1989 -A - C -13.65 -22.60 -4.702 -B - C -6.999 -22.18 +8.184 +A - C -13.65 -22.58 -4.722 +B - C -6.999 -22.06 +8.059 MODEL FORMULA (based on Wilkinson's notation): @@ -1836,9 +1837,9 @@

Demonstration 13

name mean CI_lower CI_upper N -------------------------------------------------------------------------------- -A +3.835 -2.475 +10.14 2 -B +10.48 +3.805 +17.16 2 -C +17.48 +2.735 +32.23 2 +A +3.835 -2.493 +10.16 2 +B +10.48 +3.807 +17.16 2 +C +17.48 +2.811 +32.16 2

and the following figure

diff --git a/docs/function/bootmode.html b/docs/function/bootmode.html index 89293cf0..f2a6560b 100644 --- a/docs/function/bootmode.html +++ b/docs/function/bootmode.html @@ -3,7 +3,7 @@ - + @@ -151,7 +151,7 @@

Demonstration 1

ans = H1 is 1 with p = 0 so reject the null hypothesisthat there is 1 mode -ans = H2 is 0 with p = 0.319 so accept the null hypothesis that there are 2 modes +ans = H2 is 0 with p = 0.325 so accept the null hypothesis that there are 2 modes

Package: statistics-resampling

diff --git a/docs/function/bootstrp.html b/docs/function/bootstrp.html index 5a1875ac..4710051d 100644 --- a/docs/function/bootstrp.html +++ b/docs/function/bootstrp.html @@ -3,7 +3,7 @@ - + @@ -20,36 +20,38 @@

bootstrp

-
 Balanced bootstrap resampling.
+
 Bootstrap resampling.
 
 
  -- Function File: BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D)
  -- Function File: BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D1, ..., DN)
- -- Function File: BOOTSTAT = bootstrp (..., 'seed', SEED)
  -- Function File: BOOTSTAT = bootstrp (..., 'Options', PAROPT)
+ -- Function File: BOOTSTAT = bootstrp (..., 'Weights', WEIGHTS)
+ -- Function File: BOOTSTAT = bootstrp (..., 'seed', SEED)
+ -- Function File: BOOTSTAT = bootstrp (..., 'loo', LOO)
+ -- Function File: BOOTSTAT = bootstrp (..., D1, ..., DN, 'match', MATCH)
  -- Function File: [BOOTSTAT, BOOTSAM] = bootstrp (...) 
 
-     BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D) draws NBOOT bootstrap resamples
-     from the data D and returns the statistic computed by BOOTFUN in BOOTSTAT
-     [1]. bootstrp resamples from the rows of a data sample D (column vector
-     or a matrix). BOOTFUN is a function handle (e.g. specified with @), or a
-     string indicating the function name. The third input argument is data
-     (column vector or a matrix), that is used to create inputs for BOOTFUN.
-     The resampling method used throughout is balanced bootstrap resampling
-     [2-3].
-
-     BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D1,...,DN) is as above except that 
-     the third and subsequent numeric input arguments are data vectors that
-     are used to create inputs for BOOTFUN.
+     'BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D)' draws NBOOT bootstrap resamples
+     with replacement from the rows of the data D and returns the statistic
+     computed by BOOTFUN in BOOTSTAT [1]. BOOTFUN is a function handle (e.g.
+     specified with @) or name, a string indicating the function name, or a
+     cell array, where the first cell is one of the above function definitions
+     and the remaining cells are (additional) input arguments to that function
+     (after the data argument(s)). The third input argument is the data
+     (column vector, matrix or cell array), which is supplied to BOOTFUN. The
+     simulation method used by default is bootstrap resampling with first order
+     balance [2-3].
 
-     BOOTSTAT = bootstrp (..., 'seed', SEED) initialises the Mersenne Twister
-     random number generator using an integer SEED value so that bootci results
-     are reproducible.
+     'BOOTSTAT = bootstrp (NBOOT, BOOTFUN, D1,...,DN)' is as above except that 
+     the third and subsequent input arguments are data are used to create
+     inputs for BOOTFUN.
 
-     BOOTSTAT = bootstrp (..., 'Options', PAROPT) specifies options that govern
-     if and how to perform bootstrap iterations using multiple processors (if
-     the Parallel Computing Toolbox or Octave Parallel package is available).
-     This argument is a structure with the following recognised fields:
+     'BOOTSTAT = bootstrp (..., 'Options', PAROPT)' specifies options that
+     govern if and how to perform bootstrap iterations using multiple
+     processors (if the Parallel Computing Toolbox or Octave Parallel package).
+     is available This argument is a structure with the following recognised
+     fields:
         o 'UseParallel':  If true, use parallel processes to accelerate
                           bootstrap computations on multicore machines. 
                           Default is false for serial computation. In MATLAB,
@@ -57,10 +59,43 @@ 

bootstrp

has already been started. o 'nproc': nproc sets the number of parallel processes - [BOOTSTAT, BOOTSAM] = bootstrp (...) also returns BOOTSAM, a matrix of - indices from the bootstrap. Each column in BOOTSAM corresponds to one - bootstrap sample and contains the row indices of the values drawn from - the nonscalar data argument to create that sample. + 'BOOTSTAT = bootstrp (..., D1, ..., DN, 'match', MATCH)' controls the + resampling strategy when multiple data arguments are provided. When MATCH + is true, row indices of D1 to DN are the same (i.e. matched) for each + resample. This is the default strategy when D1 to DN all have the same + number of rows. If MATCH is set to false, then row indices are resampled + indpendently for D1 to DN in each of the resamples. When any of the data + D1 to DN, have a different number of rows, this input argument is ignored + and MATCH is enforced to have a value of false. + + 'BOOTSTAT = bootstrp (..., D, 'weights', WEIGHTS)' sets the resampling + weights. WEIGHTS must be a column vector with the same number of rows as + the data, D. If WEIGHTS is empty or not provided, the default is a vector + of length N with uniform weighting 1/N. + + 'BOOTSTAT = bootstrp (..., D1, ... DN, 'weights', WEIGHTS)' as above if + MATCH is true. If MATCH is false, a 1-by-N cell array of column vectors + can be provided to specify independent resampling weights for D1 to DN. + + 'BOOTSTAT = bootstrp (..., 'loo', LOO)' sets the simulation method. If + LOO is false, the resampling method used is balanced bootstrap resampling. + If LOO is true, the resampling method used is balanced bootknife + resampling [4]. The latter involves creating leave-one-out jackknife + samples of size N - 1, and then drawing resamples of size N with + replacement from the jackknife samples, thereby incorporating Bessel's + correction into the resampling procedure. LOO must be a scalar logical + value. The default value of LOO is false. + + 'BOOTSTAT = bootstrp (..., 'seed', SEED)' initialises the Mersenne Twister + random number generator using an integer SEED value so that bootci results + are reproducible. + + '[BOOTSTAT, BOOTSAM] = bootstrp (...)' also returns indices used for + bootstrap resampling. If MATCH is true or only one data argument is + provided, BOOTSAM is a matrix. If multiple data arguments are provided + and MATCH is false, BOOTSAM is returned in a 1-by-N cell array of + matrices, where each cell corresponds to the respective data argument + D1 to DN. Bibliography: [1] Efron, and Tibshirani (1993) An Introduction to the @@ -69,8 +104,11 @@

bootstrp

Biometrika, 73: 555-66 [3] Booth, Hall and Wood (1993) Balanced Importance Resampling for the Bootstrap. The Annals of Statistics. 21(1):286-298 + [4] Hesterberg T.C. (2004) Unbiasing the Bootstrap—Bootknife Sampling + vs. Smoothing; Proceedings of the Section on Statistics & the + Environment. Alexandria, VA: American Statistical Association. - bootstrp (version 2023.06.20) + bootstrp (version 2024.04.23) Author: Andrew Charles Penn https://www.researchgate.net/profile/Andrew_Penn/ @@ -99,64 +137,169 @@

Demonstration 1

0 33 28 34 4 32 24 47 41 24 26 30 41]'; % Compute 50 bootstrap statistics for the mean and calculate the bootstrap - % standard arror - bootstat = bootstrp (50, @mean, data) + % standard error of the mean + bootstat = bootstrp (50, @mean, data, 'seed', 1); + % Or equivalently + bootstat = bootstrp (50, @mean, data, 'seed', 1, 'loo', false); + std (bootstat)
+

Produces the following output

+
ans = 2.7156
+
+ +

Demonstration 2

+
+

The following code

+
+
+ % Input univariate dataset
+ data = [48 36 20 29 42 42 20 42 22 41 45 14 6 ...
+         0 33 28 34 4 32 24 47 41 24 26 30 41]';
+
+ % Compute 50 bootknife statistics for the mean and calculate the unbiased
+ % bootstrap standard error of the mean
+ bootstat = bootstrp (50, @mean, data, 'seed', 1, 'loo', true);
+ std (bootstat)
+

Produces the following output

+
ans = 2.4052
+
+ +

Demonstration 3

+
+

The following code

+
+
+ % Input univariate dataset
+ data = [48 36 20 29 42 42 20 42 22 41 45 14 6 ...
+         0 33 28 34 4 32 24 47 41 24 26 30 41]';
+ % Split data into consecutive blocks of two data observations per cell
+ data_blocks = mat2cell (data, 2 * (ones (13, 1)), 1);
+
+ % Compute 50 bootknife statistics for the mean and calculate the unbiased
+ % bootstrap standard error of the mean
+ bootstat = bootstrp (50, @(x) mean (cell2mat (x)), data_blocks, 'seed', 1, ...
+                                                                 'loo', true);
+ std (bootstat)
+

Produces the following output

+
ans = 2.9384
+
+ +

Demonstration 4

+
+

The following code

+
+
+ % Input univariate dataset
+ data = [48 36 20 29 42 42 20 42 22 41 45 14 6 ...
+         0 33 28 34 4 32 24 47 41 24 26 30 41]';
+
+ % Compute 50 bootknife statistics for the variance and calculate the
+ % unbiased standard error of the variance
+ bootstat = bootstrp (50, {@var, 1}, data, 'loo', true);
+ std (bootstat)
+

Produces the following output

+
ans = 39.204
+
+ +

Demonstration 5

+
+

The following code

+
+
+ % Input two-sample dataset
+ X = [212 435 339 251 404 510 377 335 410 335 ...
+      415 356 339 188 256 296 249 303 266 300]';
+ Y = [247 461 526 302 636 593 393 409 488 381 ...
+      474 329 555 282 423 323 256 431 437 240]';
+
+ % Compute 50 bootknife statistics for the mean difference between X and Y
+ % and calculate the unbiased bootstrap standard error of the mean difference
+ bootstat = bootstrp (50, @(x, y) mean (x - y), X, Y, 'loo', true);
+ % Or equivalently
+ bootstat = bootstrp (50, @(x, y) mean (x - y), X, Y, 'loo', true, ...
+                                                      'match', true);
+ std (bootstat)
+

Produces the following output

+
ans = 14.614
+
+ +

Demonstration 6

+
+

The following code

+
+
+ % Input two-sample dataset
+ X = [212 435 339 251 404 510 377 335 410 335 ...
+      415 356 339 188 256 296 249 303 266 300]';
+ Y = [247 461 526 302 636 593 393 409 488 381 ...
+      474 329 555 282 423 323 256 431 437 240]';
+
+ % Compute 50 bootknife statistics for the difference in mean between
+ % between independent samples X and Y and calculate the unbiased bootstrap
+ % standard error of the difference in mean
+ bootstat = bootstrp (50, @(x, y) mean (x) - mean(y), X, Y, 'loo', true, ...
+                                                            'match', false);
  std (bootstat)

Produces the following output

-
bootstat =
-
-       30.385
-       26.577
-       32.962
-       26.885
-       28.962
-       27.385
-       29.538
-       28.615
-       36.269
-       29.192
-       36.192
-       35.346
-       30.923
-       31.423
-       30.231
-       25.692
-       28.577
-       27.038
-       26.269
-       31.423
-       30.154
-       29.654
-       28.577
-       32.154
-       28.385
-       32.615
-       24.846
-       32.269
-       25.577
-       29.615
-       26.923
-       27.038
-       26.731
-       33.923
-       31.962
-       26.538
-       26.846
-       29.769
-           27
-       26.731
-       29.231
-       30.885
-       31.077
-           30
-       29.115
-       31.769
-       32.423
-       30.692
-       29.231
-       31.077
-
-ans = 2.7164
+
ans = 32.705
+
+ +

Demonstration 7

+
+

The following code

+
+
+ % Input bivariate dataset
+ X = [212 435 339 251 404 510 377 335 410 335 ...
+      415 356 339 188 256 296 249 303 266 300]';
+ Y = [247 461 526 302 636 593 393 409 488 381 ...
+      474 329 555 282 423 323 256 431 437 240]';
+
+ % Compute 50 bootstrap statistics for the correlation coefficient and
+ % calculate the bootstrap standard error of the correlation coefficient
+ bootstat = bootstrp (50, @cor, X, Y);
+ std (bootstat)
+

Produces the following output

+
ans = 0.098974
+
+ +

Demonstration 8

+
+

The following code

+
+
+ % Input bivariate dataset
+ X = [212 435 339 251 404 510 377 335 410 335 ...
+      415 356 339 188 256 296 249 303 266 300]';
+ Y = [247 461 526 302 636 593 393 409 488 381 ...
+      474 329 555 282 423 323 256 431 437 240]';
+
+ % Compute 50 bootstrap statistics for the coefficient of determination and
+ % calculate the bootstrap standard error of the coefficient of determination
+ bootstat = bootstrp (50, {@cor,'squared'}, X, Y);
+ std (bootstat)
+

Produces the following output

+
ans = 0.1265
+
+ +

Demonstration 9

+
+

The following code

+
+
+ % Input bivariate dataset
+ X = [212 435 339 251 404 510 377 335 410 335 ...
+      415 356 339 188 256 296 249 303 266 300]';
+ Y = [247 461 526 302 636 593 393 409 488 381 ...
+      474 329 555 282 423 323 256 431 437 240]';
+
+ % Compute 50 bootstrap statistics for the slope and intercept of a linear
+ % regression and calculate there bootstrap standard errors
+ bootstat = bootstrp (50, @mldivide, cat (2, ones (20, 1), X), Y);
+ std (bootstat)
+

Produces the following output

+
ans =
+
+       61.963      0.17194

Package: statistics-resampling

diff --git a/docs/function/bootwild.html b/docs/function/bootwild.html index e3716147..9dd4e6c9 100644 --- a/docs/function/bootwild.html +++ b/docs/function/bootwild.html @@ -3,7 +3,7 @@ - + @@ -180,7 +180,7 @@

Demonstration 1

Test Statistics: original std_err CI_lower CI_upper t-stat p-val FPR - +184.5 +1.243 +181.6 +187.4 +148. <.001 .010 + +184.5 +1.243 +181.7 +187.3 +148. <.001 .010

Demonstration 2

@@ -218,8 +218,8 @@

Demonstration 2

Test Statistics: original std_err CI_lower CI_upper t-stat p-val FPR - +175.5 +2.502 +169.8 +181.2 +70.1 <.001 .010 - +0.1904 +0.08261 +0.003534 +0.3773 +2.31 .047 .280 + +175.5 +2.502 +169.7 +181.3 +70.1 <.001 .010 + +0.1904 +0.08261 -0.001851 +0.3827 +2.31 .050 .291

Package: statistics-resampling

diff --git a/docs/function/cor.html b/docs/function/cor.html index 11d65238..ebf979e8 100644 --- a/docs/function/cor.html +++ b/docs/function/cor.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/credint.html b/docs/function/credint.html index 8e8068ba..46e4562c 100644 --- a/docs/function/credint.html +++ b/docs/function/credint.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/deffcalc.html b/docs/function/deffcalc.html index aa49b4ed..647d0494 100644 --- a/docs/function/deffcalc.html +++ b/docs/function/deffcalc.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/images/boot1way_701.png b/docs/function/images/boot1way_701.png index f7685476..e6f0edd2 100644 Binary files a/docs/function/images/boot1way_701.png and b/docs/function/images/boot1way_701.png differ diff --git a/docs/function/images/boot1way_801.png b/docs/function/images/boot1way_801.png index a192adf5..d18668a1 100644 Binary files a/docs/function/images/boot1way_801.png and b/docs/function/images/boot1way_801.png differ diff --git a/docs/function/randtest.html b/docs/function/randtest.html index b9c18dbc..fbf56bef 100644 --- a/docs/function/randtest.html +++ b/docs/function/randtest.html @@ -3,7 +3,7 @@ - + @@ -143,8 +143,8 @@

Demonstration 2

Produces the following output

pval =
 
-      0.53148
-   0.00049014
+      0.53557
+   0.00052785
 
 stat =
 
@@ -170,7 +170,7 @@ 

Demonstration 3

% of standardized x and y values. [pval, stat] = randtest (X, Y, 5000, @cor)

Produces the following output

-
pval = 0.0002
+
pval = 0.00072276
 stat = 0.72317
diff --git a/docs/function/randtest1.html b/docs/function/randtest1.html index 0c109a9e..ad467a7c 100644 --- a/docs/function/randtest1.html +++ b/docs/function/randtest1.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/randtest2.html b/docs/function/randtest2.html index 41255ad1..b97ed2dc 100644 --- a/docs/function/randtest2.html +++ b/docs/function/randtest2.html @@ -3,7 +3,7 @@ - + @@ -159,9 +159,9 @@

Demonstration 1

@(A, B) log (var (A) ./ var (B)))

Produces the following output

-
pval = 0.3668
+
pval = 0.3596
 pval = 0.2698
-pval = 0.30905
+pval = 0.3168

Demonstration 2

@@ -212,7 +212,7 @@

Demonstration 3

pval = randtest2 ([A GA], [B GB], false, 5000)

Produces the following output

-
pval = 0.0020483
+
pval = 0.00065
 pval =   0.2
@@ -235,7 +235,7 @@

Demonstration 4

pval = randtest2 ([A GA], [B GB], true, 5000)

Produces the following output

-
pval = 0.0022
+
pval = 0.0014
 pval =  0.25
@@ -257,7 +257,7 @@

Demonstration 5

pval = randtest2([A, GA], [B, GB], false)

Produces the following output

-
pval = 0.0738
+
pval = 0.0702

Package: statistics-resampling

diff --git a/docs/function/sampszcalc.html b/docs/function/sampszcalc.html index 43f1e053..06481464 100644 --- a/docs/function/sampszcalc.html +++ b/docs/function/sampszcalc.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/smoothmad.html b/docs/function/smoothmad.html index fef747b4..e2d2c46d 100644 --- a/docs/function/smoothmad.html +++ b/docs/function/smoothmad.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function/smoothmedian.html b/docs/function/smoothmedian.html index 5d1eb25d..b590e1ac 100644 --- a/docs/function/smoothmedian.html +++ b/docs/function/smoothmedian.html @@ -3,7 +3,7 @@ - + diff --git a/docs/function_reference.html b/docs/function_reference.html index 5ae163d7..2b4f33a9 100644 --- a/docs/function_reference.html +++ b/docs/function_reference.html @@ -3,7 +3,7 @@ - + @@ -67,7 +67,7 @@

Main functions

Cloned Matlab functions

-
Balanced bootstrap resampling.
+
Bootstrap resampling.
Performs single or double bootstrap (or bootknife) resampling and calculates confidence intervals.
diff --git a/docs/index.html b/docs/index.html index 6f94d84d..bb3104fb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ - + @@ -28,7 +28,7 @@

About this package

- + diff --git a/inst/bootstrp.m b/inst/bootstrp.m index 69178305..c80e083a 100755 --- a/inst/bootstrp.m +++ b/inst/bootstrp.m @@ -42,7 +42,7 @@ % is true, row indices of D1 to DN are the same (i.e. matched) for each % resample. This is the default strategy when D1 to DN all have the same % number of rows. If MATCH is set to false, then row indices are resampled -% indpendently for D1 to DN in each of the resamples. When any of the data +% independently for D1 to DN in each of the resamples. When any of the data % D1 to DN, have a different number of rows, this input argument is ignored % and MATCH is enforced to have a value of false. %
Package Version:5.5.9
Last Release Date:2024-04-21
Last Release Date:2024-04-24
Package Author:Andrew Penn <andy.c.penn@gmail.com>
Package Maintainer:Andrew Penn <andy.c.penn@gmail.com>
License:GPLv3+