Description Usage Arguments Details Value Author(s) References Examples
Plots the AUC or the R2 as a function of training sample size.
1 2 3 4 5 |
xlim |
Vector of 2 elements, giving the range of sample size to display on the x-axis, in 1000s. For binary traits this is the number of cases. |
ylim |
Range of AUC/R2 to display on y-axis. |
nsnp |
Number of independent SNPs in the gene score. |
vg1 |
Proportion of variance explained by genetic effects in the training sample. |
pi0 |
Proportion of markers with no effect on the training trait. |
cov12 |
Covariance between genetic effect sizes in the two samples. If the effects are fully correlated then cov12<=sqrt(vg1). If the effects are identical then cov12=vg1 (default). |
fix |
TRUE if the same genetic model is assumed for the training and target samples. |
binary |
TRUE if the training trait is binary. By default, the target trait is binary if the training trait is; otherwise binary should be a vector with two elements for the training and target samples respectively. |
prevalence |
For a binary trait, prevalence in the training sample. By default, prevalence is the same in the target sample. Otherwise, prevalence should be a vector with two elements for the training and target samples respectively. |
sampling |
For a binary trait, case/control sampling fraction in the training sample. By default, sampling equals the prevalence, as in a cohort study. If the sampling fraction is different in the target sample, sampling should be a vector with two elements for the training and target samples respectively. |
r2gx |
Proportion of variance in environmental risk score explained by genetic effects in training sample. |
corgx |
Genetic correlation between environmental risk score and training trait. |
r2xy |
Proportion of variance in training trait explained by environmental risk score. |
adjustedEffects |
TRUE if polygenic and envrionmental scores are combined as a weighted sum. If FALSE, the scores are combined as an unweighted sum even if they are correlated. |
plot |
TRUE is a new plot is to be drawn, otherwise draw lines on the existing plot. |
col |
Colour in which to plot. |
breakeven |
Value of AUC/R2 for which the minimum sample size will be estimated. |
lty |
Line type parameter for R plots. |
AUC is plotted for binary traits, R2 for quantitative traits. At each point, the p-value threshold is identified for selecting markers into the polygenic score, such that the AUC or R2 is maximised.
A list with the following elements:
limit
Value of AUC/R2 at the maximum sample size plotted.
breakeven
Sample size at which the AUC/R2 exceeds the value specified by the breakeven parameter.
plimit
Optimal P-value threshold at the maximum sample size plotted.
Frank Dudbridge
Dudbridge F (2013) Power and predictive accuracy of polygenic risk scores. PLoS Genet 9:e1003348
1 2 | # Breast cancer with 90% null markers, from figure 3 in Dudbridge (2013)
plotAccuracy(vg1=0.44/2,pi0=0.90,fix=TRUE,binary=TRUE,prevalence=0.036)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.