gsensY: Sensivity analysis based on one polygenic score for the...

Usage Arguments Value References Examples

View source: R/gsens.R

Usage

1
gsensY(rxy,rgx,rgy,n,h2,constrain=NULL,print=FALSE)

Arguments

rxy

the observed phenotypic correlation between exposure X and outcome Y

rgx

the observed correlation between the polygenic score for Y and exposure X

rgy

the observed correlation between the polygenic score for Y and outcome Y

n

sample size

h2

the additive genetic variance explained in outcome Y under the scenario of interest

print

optional, enables the examination of model parameters (default = FALSE)

constrain

optional, agrument to constrain model parameters (default = NULL)

Value

The function returns a dataframe with 3 estimates

Adjusted Bxy

the standardized estimate of the relationship between X and Y, adjusted for G

Genetic confounding

the estimate of genetic confounding

Total effect

This is the total effect

References

1. Pingault, J.-B., O’Reilly, P. F., Schoeler, T., Ploubidis, G. B., Rijsdijk, F., & Dudbridge, F. (2018). Using genetic data to strengthen causal inference in observational research. Nature Reviews Genetics, 19(9), 566–580. https://doi.org/10.1038/s41576-018-0020-3

2. Pingault, J.-B., Rijsdijk, F., Schoeler, T., Choi, S. W., Selzam, S., Kraphol, E., O’Reilly, P. F., & Dudbridge, F. Genetic sensitivity analysis: adjusting for genetic confounding in epidemiological associations. BioRxiv.

Examples

1
2
3
4
5
gsensY(rxy=0.3975,
             rgx = 0.2909,
             rgy = 0.3462,
             n=3785,
             h2=0.3462^2)

JBPG/Gsens documentation built on Dec. 31, 2020, 1:07 p.m.