The WSS method has been proposed by Madsen and Browning (2009) as a pooling approach. In WSS, rare-variant counts within the same gene for each individual are accumulated rather than collapsing on them. Second, it introduces a weighting term to emphasize alleles with a low frequency in controls. Finally, the scores for all samples are ordered, and the WSS is computed as the sum of ranks for cases. The significance is determined by a permutation procedure.

1 | ```
WSS(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:

`wss.stat` |
wss statistic |

`perm.pval` |
permuted p-value |

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

`name` |
name of the statistic |

Gaston Sanchez

Madsen BE, Browning SR (2009) A Groupwise Association Test for Rare Mutations Using a Weighted Sum Statistic. *PLoS Genetics*, **5(2)**: e1000384

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 WSS with 500 permutations
mywss = WSS(phenotype, genotype, perm=500)
mywss
## End(Not run)
``` |

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

Please suggest features or report bugs with the GitHub issue tracker.

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