# jaccard.test.bootstrap: Compute p-value using the bootstrap procedure In jaccard: Test Similarity Between Binary Data using Jaccard/Tanimoto Coefficients

## Description

Compute statistical significance of Jaccard/Tanimoto similarity coefficients.

## Usage

 ```1 2``` ```jaccard.test.bootstrap(x, y, px = NULL, py = NULL, verbose = TRUE, fix = "x", B = 1000, seed = NULL) ```

## Arguments

 `x` a binary vector (e.g., fingerprint) `y` a binary vector (e.g., fingerprint) `px` probability of successes in `x` (optional) `py` probability of successes in `y` (optional) `verbose` whether to print progress messages `fix` whether to fix (i.e., not resample) `x` and/or `y` `B` a total bootstrap iteration `seed` a seed for a random number generator

## Value

`jaccard.test.bootstrap` returns a list consisting of

 `statistics` centered Jaccard/Tanimoto similarity coefficient `pvalue` p-value `expectation` expectation

## Examples

 ```1 2 3 4``` ```set.seed(1234) x = rbinom(100,1,.5) y = rbinom(100,1,.5) jaccard.test.bootstrap(x,y,B=500) ```

### Example output

```Bootstrap Procedures :
50 100 150 200 250 300 350 400 450 500 \$statistics
[1] -0.02460145

\$statistics.null
[1] -0.0489180408  0.0044296788  0.0308631787 -0.0112775240 -0.0498575499
[6]  0.0807138179 -0.0652350571  0.0191649555 -0.0263461114 -0.0436781609
[11]  0.0026790108  0.0000000000 -0.0674151311 -0.0317304241 -0.0207655142
[16] -0.0498575499  0.0677795031  0.0276833414  0.0368923112 -0.0035064574
[21] -0.0009072658  0.0276833414 -0.0395869191  0.0424255297  0.0390355913
[26]  0.0174825175 -0.0207655142 -0.0789036545 -0.0609528487  0.0379442982
[31] -0.0089749646  0.0276833414 -0.0207402180  0.0055476529 -0.0674151311
[36]  0.0256192450 -0.0489180408 -0.0581945229 -0.0765785938  0.0354251012
[41] -0.0652350571  0.0795470497 -0.0149786469 -0.0149786469  0.0613074252
[46]  0.0379442982 -0.0674151311 -0.0282605410 -0.0071239718 -0.0721366479
[51] -0.1085311969  0.0174390102  0.0174808406 -0.0131141808  0.0073381465
[56] -0.0226696259 -0.0341683778 -0.0457642516 -0.0246014493  0.0453050786
[61]  0.0191649555  0.0394657976 -0.0263461114 -0.1013346163  0.0986445415
[66]  0.0613074252 -0.0146985962  0.0140252454 -0.0900866813 -0.0560704356
[71] -0.0539728132  0.0482624005  0.0308631787  0.0954213982 -0.0489180408
[76]  0.0240471513 -0.0395869191  0.0548935842 -0.0247216731 -0.0089749646
[81]  0.0409593592 -0.0247216731  0.0243882326 -0.0361925511  0.0240471513
[86] -0.0878012048  0.0190767934 -0.0035064574  0.0095154156 -0.0718513291
[91]  0.0108323407  0.0108323407  0.0061524144 -0.0375820310  0.0783546864
[96]  0.0758901198 -0.0017394829  0.0609284988 -0.0131141808 -0.0017394829
[101]  0.0452778988 -0.0188890000 -0.0531294881 -0.0149786469 -0.0856836006
[106] -0.0108543417  0.0613074252 -0.0246014493  0.0292874396  0.0496987952
[111]  0.0733137830  0.0677795031 -0.0539728132  0.0292874396  0.0086189206
[116] -0.0765785938  0.0818557266  0.0191649555 -0.0510104831 -0.0053012048
[121]  0.0867139959 -0.0089749646  0.0409593592 -0.0265610438 -0.0035064574
[126] -0.0027433479 -0.0424279105  0.0276833414  0.0000000000  0.1523107355
[131] -0.0436781609  0.0703239519  0.0009001153 -0.0468523724  0.0348153376
[136]  0.0256192450  0.0256192450 -0.0035064574  0.0271644333 -0.0341683778
[141] -0.0108543417  0.0298992890 -0.0560704356  0.0703239519 -0.0721366479
[146] -0.0369278973 -0.0457642516  0.0240471513 -0.0053012048 -0.0375820310
[151] -0.0428018076 -0.0027433479 -0.0609528487  0.0108323407  0.0276833414
[156]  0.0529610014 -0.0302023558  0.0467980296 -0.0089749646 -0.0833042596
[161] -0.0168710805  0.0339315128  0.0379442982  0.0009001153  0.0315683056
[166]  0.0308631787  0.0157677185  0.0453050786  0.0771359700  0.0026790108
[171]  0.0394657976  0.0108323407  0.0544231807 -0.0436781609  0.0111564042
[176]  0.0158613373  0.0125366330  0.0482624005 -0.0468523724  0.0409593592
[181]  0.0026790108 -0.0547273841  0.0174825175  0.0292874396 -0.0428018076
[186] -0.0282605410  0.0276833414 -0.0603448276  0.0529610014 -0.0225988701
[191] -0.0521809270 -0.0361925511 -0.0285484057 -0.0560704356 -0.0207655142
[196] -0.0457642516  0.0276833414 -0.0071239718 -0.0382440232 -0.0408169680
[201]  0.0044296788  0.0240471513  0.0453050786 -0.0265610438  0.0073381465
[206] -0.0766935895 -0.0609528487  0.0771359700  0.0174808406  0.0363943215
[211] -0.0403225806 -0.0489180408  0.0240471513  0.0840677966 -0.0134232320
[216] -0.0027433479 -0.0743450390  0.0243882326  0.0900813854 -0.0302023558
[221] -0.0361925511 -0.0552747525  0.0061524144  0.0758901198 -0.0149786469
[226] -0.0089749646 -0.0721366479 -0.0108543417 -0.0367726584  0.0066895572
[231]  0.1065699007  0.0226963618  0.0208204399 -0.0053012048  0.1403770767
[236] -0.0149786469  0.0409593592  0.0637566081  0.0986445415  0.0033977556
[241] -0.0302023558  0.0911537350  0.0191649555  0.0758901198 -0.0321716293
[246] -0.0510104831  0.0224476969 -0.0375820310  0.0142128408 -0.0356043522
[251] -0.0341683778 -0.0539728132  0.0018787251 -0.0966453136  0.0090996169
[256] -0.0187915885  0.0026790108 -0.0498575499 -0.0187915885  0.0260504202
[261] -0.0702179177  0.0942928040 -0.0531294881 -0.0436781609 -0.0265610438
[266]  0.0703239519 -0.0071239718 -0.0375820310  0.0271644333  0.0037279048
[271]  0.0438648590  0.0224476969 -0.0674151311  0.0009001153 -0.0788367979
[276]  0.0482624005 -0.0531294881  0.1403770767 -0.0356043522  0.0373909332
[281] -0.0246014493  0.0090996169  0.0142128408 -0.0510104831  0.0613074252
[286] -0.0046082949  0.0878623188  0.0467980296  0.0174825175 -0.0765785938
[291]  0.0018787251  0.0348153376  0.0409593592 -0.0059322034  0.0292874396
[296] -0.0009072658 -0.0089749646  0.0276833414  0.0795470497 -0.0510104831
[301]  0.0715570836 -0.0071239718  0.0394657976  0.0613074252 -0.0603448276
[306] -0.0131141808 -0.0246014493 -0.0302023558 -0.0071239718  0.0348153376
[311]  0.0558560192 -0.0356043522 -0.0317304241  0.0108323407 -0.0166634744
[316]  0.0637566081 -0.0112775240 -0.0656660413  0.0482624005  0.0379442982
[321]  0.0037279048  0.0226963618 -0.0457642516 -0.0187915885 -0.0669490854
[326] -0.0263461114  0.0260504202 -0.0408169680 -0.0027433479  0.0379442982
[331]  0.0437829470  0.0208204399 -0.0625210084  0.0108323407 -0.0076867914
[336] -0.0489180408 -0.0382440232  0.0409593592  0.0157677185 -0.1109688519
[341] -0.0227169468 -0.0168710805 -0.0149786469 -0.0265610438  0.0044296788
[346] -0.0285484057 -0.0112775240 -0.0302023558  0.0026790108 -0.0834244649
[351]  0.0140252454  0.0363943215 -0.0168710805 -0.0468523724 -0.0046082949
[356] -0.0467170478 -0.0603448276  0.0276833414 -0.0149786469  0.0108323407
[361]  0.0332068311  0.0332068311  0.0061524144 -0.0428018076  0.0383336530
[366]  0.0226963618 -0.0207655142 -0.0027433479 -0.1265233623  0.0157677185
[371]  0.0090996169  0.0308631787 -0.0652350571 -0.0053012048 -0.0436781609
[376]  0.0157677185 -0.0448136082  0.0174825175 -0.0989785044 -0.0539728132
[381]  0.0529610014  0.0276833414 -0.0089749646  0.1396910248  0.0208204399
[386]  0.0000000000 -0.0131141808  0.0140252454 -0.0630808697  0.0783546864
[391] -0.0521809270 -0.0285484057 -0.0166634744  0.0026790108 -0.0718513291
[396] -0.0263461114  0.0256192450 -0.0321716293  0.0044296788  0.0055476529
[401] -0.0674151311  0.0690649924  0.0422310413  0.0677795031  0.0090996169
[406] -0.0166634744 -0.0187915885  0.0558560192 -0.0574458683  0.0190767934
[411]  0.0379442982 -0.0356043522 -0.0970839260  0.0240471513  0.0467980296
[416] -0.1030789826 -0.0168710805  0.0453050786  0.0524900713 -0.0321716293
[421]  0.0878623188 -0.0112775240 -0.0478400296 -0.0094684743 -0.0071239718
[426]  0.0271644333 -0.0428018076  0.0409593592  0.0572601936 -0.0855402456
[431] -0.0560704356 -0.0718513291  0.0394657976 -0.0321716293  0.0260504202
[436] -0.0652350571  0.0271644333 -0.0009072658 -0.0168710805 -0.0094684743
[441] -0.0112775240 -0.0265610438  0.0437829470 -0.0321716293  0.0453050786
[446]  0.0739485883 -0.0046082949  0.0467980296 -0.0336538462  0.0044296788
[451] -0.0468523724 -0.0321716293  0.0018787251  0.0511078180 -0.0035064574
[456] -0.0721366479  0.0224476969 -0.0395869191  0.0224476969  0.0243882326
[461] -0.0246014493 -0.0035064574  0.0453050786 -0.0084251317 -0.0416189931
[466]  0.0424255297 -0.0302023558 -0.0457642516 -0.0302023558  0.0308631787
[471]  0.0394657976 -0.0017394829 -0.0674151311 -0.0089749646  0.0315683056
[476] -0.0094684743  0.0260504202  0.0108323407  0.0931354698  0.0095154156
[481]  0.0324110390  0.0044296788 -0.0468523724  0.0073381465 -0.0531294881
[486] -0.0207655142  0.0174808406  0.0292874396 -0.0346758968 -0.0207402180
[491]  0.0026790108 -0.0089749646 -0.0552747525 -0.0539728132 -0.0603448276
[496]  0.0586363766  0.0174808406  0.0599852344  0.0073381465 -0.0382440232

\$pvalue
[1] 0.63

\$expectation
[1] 0.3179348
```

jaccard documentation built on May 2, 2019, 12:51 p.m.