The Replication-Based Test has been proposed by Ionita-Laza et al (2011). RBT is based on a weighted-sum statistic that is similar to a pooled association test but purposefully designed to deal with possibly different association directions. The significance of the statistic has to be calculated by permutations.

1 | ```
RBT(y, X, perm = 100)
``` |

`y` |
numeric vector with phenotype status: 0=controls, 1=cases. No missing data allowed |

`X` |
numeric matrix or data frame with genotype data coded as 0, 1, 2. Missing data is allowed |

`perm` |
positive integer indicating the number of permutations (100 by default) |

There is no imputation for the missing data. Missing values are simply ignored in the computations.

An object of class `"assoctest"`

, basically a list with the following elements:

`rbt.stat` |
rbt statistic |

`perm.pval` |
permuted p-value |

`args` |
descriptive information with number of controls, cases, variants, and permutations |

`name` |
name of the statistic |

Gaston Sanchez

Ionita-Laza I, Buxbaum JD, Laird NM, Lange C (2011) A New Testing Strategy to Identify Rare Variants with Either risk or Protective Effects on Disease. *PLoS Genetics*, **7(2)**: e1001289

`WSS`

, `CMC`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
## Not run:
# number of cases
cases = 500
# number of controls
controls = 500
# total (cases + controls)
total = cases + controls
# phenotype vector
phenotype = c(rep(1, cases), rep(0, controls))
# genotype matrix with 10 variants (random data)
set.seed(123)
genotype = matrix(rbinom(total*10, 2, 0.05), nrow=total, ncol=10)
# apply RBT with 500 permutations
myrbt = RBT(phenotype, genotype, perm=500)
myrbt
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.