# Which bootstrap for small set of independent data?

I am thinking which bootstrap to choose for studying MIT-BIH arrythmia database (44 patients) in time-domain and Fourier-domain. I need to find a variable which can allow me to determine mean and variance of the 1D data, but I am not sure about it.

I think bootstrap fits the data because there is only a few cases and independence of samples. The theoretical distribution is complicated and/or unknown. I need power calculations.

There are many events per time unit in the ECG signal, so I am thinking about Cluster Bootstrap. I think this method has been used by some authors. This R-bloggers post seems to be promising about the topic and here about speeding up the process. Currently, I am using the default bootstrap, done as data; data=datasample(data, size(data,1)); in Matlab. My intuition about which bootstrap method good from best to worst

1. Cluster bootstrap
2. Time-series bootsrap
3. Bayesian bootstrap
4. Basic bootstap, like the one-liner in Matlab
5. No bootstrap; having the cases in order

I take lastly a random sample from the group by datasample(data, N).

## Testing the Cluster bootstrap from the first blog post

The only doubt is here that I need to find mean and stdev of the data, because I am doing cluster sampling so not sure which parameter, I should use to get the variables; there is entropy and other variables but not sure if anything standard.

Here doing bootstrapping from Normal distribution with mean=0, stdev=40 and sample size N=44

Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

as.Date, as.Date.numeric

Attaching package: ‘lfe’

The following object is masked from ‘package:lmtest’:

waldtest

Call:
lm(formula = y ~ x)

Residuals:
Min      1Q  Median      3Q     Max
-73.767 -35.860   7.194  32.447  96.114

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)    7.756      6.578   1.179    0.245
x              2.169      5.765   0.376    0.709

Residual standard error: 42.38 on 42 degrees of freedom
Multiple R-squared:  0.00336,   Adjusted R-squared:  -0.02037
F-statistic: 0.1416 on 1 and 42 DF,  p-value: 0.7086

Call:
lm(formula = y ~ x, data = dat)

Residuals:
Min      1Q  Median      3Q     Max
-73.767 -35.860   7.194  32.447  96.114

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)    7.756      1.439   5.391 9.03e-08 ***
x              2.169      1.261   1.720   0.0857 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 41.45 on 878 degrees of freedom
Multiple R-squared:  0.00336,   Adjusted R-squared:  0.002225
F-statistic:  2.96 on 1 and 878 DF,  p-value: 0.08571

Call:
felm(formula = y ~ x | 0 | 0 | g, data = dat)

Residuals:
Min      1Q  Median      3Q     Max
-73.767 -35.860   7.194  32.447  96.114

Coefficients:
Estimate Cluster s.e. t value Pr(>|t|)
(Intercept)    7.756        6.750   1.149    0.251
x              2.169        6.732   0.322    0.747

Residual standard error: 41.45 on 878 degrees of freedom
Multiple R-squared(full model): 0.00336   Adjusted R-squared: 0.002225
Multiple R-squared(proj model): 0.00336   Adjusted R-squared: 0.002225
F-statistic(full model, *iid*): 2.96 on 1 and 878 DF, p-value: 0.08571
F-statistic(proj model): 0.1038 on 1 and 43 DF, p-value: 0.7488

Time difference of 0.1756198 secs
[1] 6.501451
Time difference of 3.301254 secs
[1] 6.501451


## Which parameter can you use to get the variables mean and stdev in clustering the sample?

I see some colleagues in MathWorks doing 6th degree polynomial detrending in cardiac signals because of baseline shift i.e. due to respiratory signal. However, there is little knowledge about its validity in physiological sense. So some sort of detrending may help to get the mean and stdev of the phenomenon in the signal.

MIT-BIH signal has the frequency 180 Hz for 30 minutes recording. Doing the 6th degree detrending will put depolarisation of the signals to the specific interval so it can give us the desired mean and stdev. However, I have not found any publication which shows that the validity of the depolarisation can be maintained after the detrending.