powphenanc | R Documentation |
Estimates power for significant associations between a binary trait and global ancestries.
powphenanc(
incidence.rates,
N.adm = 3e+05,
anc.matrix,
n = 1000,
case.size = 750,
control.size = 750,
h2 = 1,
liability = NA,
anc.names = NA
)
incidence.rates |
A vector of incidence rates for the ancestral populations. |
N.adm |
Size of simulated individuals from which cases and controls are drawn from. Default is 3e5. |
anc.matrix |
A sample matrix of global ancestries, where rows represent samples and each column is one ancestry. See the format from the output of |
n |
Iteration number of phenotype-ancestry regression tests. Each iteration is an independent simulation of phenotypes and ancestries for case and controls. Default 1000. |
case.size |
Number of cases. Default 750. |
control.size |
Number of controls. Default 750. |
h2 |
Heritability. Default 1. |
liability |
Liability of the binary trait, used for defining cases and controls. If left as NA (default), then a proxy phenotype based on ancestry and incidence rates is used to reflect the probability of becoming cases. |
anc.names |
A vector of names for each ancestry, e.g. South Asian, West African, etc. It can be left unspecified (NA as default). |
A list of the following components:
ancestry | Name of ancestries |
liability_model | If a liability treshold model has been used |
powers | Power per ancestry |
AncBetaOut
# sample ancestries for a size of 100
aa_anc <- AncBetaOut(0.75, 0.01, 100)
# simulate phenotype-ancestry associations
aa_ancp <- powphenanc(incidence.rates=c(0.01, 0.05), anc.matrix=aa_anc, h2=0.5, anc.names=c("eur","waf"))
# check powers
anc_powers <- aa_ancp$powers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.