groups_by_filter | R Documentation |
Hypotheses are stratified into nbins different strata of (approximately) equal size based on increasing value of the covariate
groups_by_filter(covariate, nbins, ties.method = "random", seed = NULL)
covariate |
Numeric vector of ordinal covariates based on which the stratification will be done. |
nbins |
Integer, number of groups/strata into which p-values will be split based on covariate. |
ties.method |
Character specifying how ties are treated, see |
seed |
Integer, specifies random seed to be used when ties.method=="random". |
A factor with nbins different levels, each entry corresponds to the stratum the i-th hypothesis was assigned to.
covariates <- runif(100)
groups <- groups_by_filter(covariates,10)
table(groups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.