Title: | The Attributable Fraction (AF) Described as a Function of Disease Heritability, Prevalence and Intervention Specific Factors |
---|---|
Description: | The AFfunction() is a function which returns an estimate of the Attributable Fraction (AF) and a plot of the AF as a function of heritability, disease prevalence, size of target group and intervention effect. Since the AF is a function of several factors, a shiny app is used to better illustrate how the relationship between the AF and heritability depends on several other factors. The app is ran by the function runShinyApp(). For more information see Dahlqwist E et al. (2019) <doi:10.1007/s00439-019-02006-8>. |
Authors: | Elisabeth Dahlqwist |
Maintainer: | Elisabeth Dahlqwist <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-10-31 06:40:42 UTC |
Source: | CRAN |
AFfunction
is a function which illustrates the AF as a function of heritability, disease prevalence, size of target group and intervention effect.
AFfunction(Prevalence, Heritability, Target, Intervention, xaxis, compare, Intervention_type = "location", plot = TRUE, legend = TRUE, cex = 1.4, ...)
AFfunction(Prevalence, Heritability, Target, Intervention, xaxis, compare, Intervention_type = "location", plot = TRUE, legend = TRUE, cex = 1.4, ...)
Prevalence |
an estimate of the disease prevalence |
Heritability |
an estimate of the disease heritability |
Target |
proportion of those at highest genetic risk being targeted by the intervention |
Intervention |
effect of intervention |
xaxis |
option to specify which of the arguments |
compare |
option to specify which of the arguments |
Intervention_type |
an option to specify how the intervention is expected to affect the genetic liability distribution. The default option |
plot |
option to return a plot. Default is set to |
legend |
option to return a legend in the plot. Default is set to |
cex |
specifies the text size in the plot. Default is set to size |
... |
further arguments to be passed to the ggplot function. See |
The AFfunction() is a function that produce a plot of the AF as a function of Prevalence, Heritability, Target
or Intervention
. A user interface of the function is provided in runShinyApp
.
AF |
the AF as a function of heritability, disease prevalence, size of target group and intervention effect. |
plot |
Plot of the AF as a function of either heritability, disease prevalence, size of target group and intervention effect. The legend shows a comparison variable. |
Dahlqwist E et al. (2019) <doi:10.1007/s00439-019-02006-8>.
# Example heritability <- seq(0,1, by=0.1) target_sizes <- sort(c(0.30, 0.25, 0.20, 0.15, 0.05, 0.01)) AF_h <- AFfunction(Prevalence=0.5, Heritability = heritability, Target = target_sizes, Intervention = 1, compare="Target", xaxis = "Heritability", ylim = c(0,0.3), cex = 1.6) AF_h
# Example heritability <- seq(0,1, by=0.1) target_sizes <- sort(c(0.30, 0.25, 0.20, 0.15, 0.05, 0.01)) AF_h <- AFfunction(Prevalence=0.5, Heritability = heritability, Target = target_sizes, Intervention = 1, compare="Target", xaxis = "Heritability", ylim = c(0,0.3), cex = 1.6) AF_h
AFheritability
is a user interface for the function AFfunction
The shiny-app provides a user friendly interface for the function AFfunction
.
runShinyApp()
runShinyApp()
By running runShinyApp() a user interface for the function AFfunction
is started in RStudio. The app is also available online https://afheritability.shinyapps.io/afheritability/ (Note that the app is usually faster in the web browser Google Chrome or Firefox).
Elisabeth Dahlqwist
Dahlqwist E et al. (2019) <doi:10.1007/s00439-019-02006-8>.