| umx_make_MR_data | R Documentation |
umx_make_MR_data returns a dataset containing 4 variables: A variable of interest (Y), a putative cause (X), a qtl (quantitative trait locus) influencing X, and a confounding variable (U) affecting both X and Y.
umx_make_MR_data(
nSubjects = 1000,
Vqtl = 0.02,
bXY = 0.1,
bUX = 0.5,
bUY = 0.5,
pQTL = 0.5,
seed = 123
)
nSubjects |
Number of subjects in sample |
Vqtl |
Variance of QTL affecting causal variable X (Default 0.02) |
bXY |
Causal effect of X on Y (Default 0.1) |
bUX |
Confounding effect of confounder 'U' on X (Default 0.5) |
bUY |
Confounding effect of confounder 'U' on Y (Default 0.5) |
pQTL |
Decreaser allele frequency (Default 0.5) |
seed |
value for the random number generator (Default 123) |
The code to make these Data. Modified from Dave Evans 2016 Boulder workshop talk.
- data.frame
umx_make_TwinData
Other Data Functions:
noNAs(),
prolific_anonymize(),
prolific_check_ID(),
prolific_read_demog(),
umxFactor(),
umxHetCor(),
umx_as_numeric(),
umx_cont_2_quantiles(),
umx_lower2full(),
umx_make_TwinData(),
umx_make_fake_data(),
umx_make_raw_from_cov(),
umx_merge_randomized_columns(),
umx_polychoric(),
umx_polypairwise(),
umx_polytriowise(),
umx_read_lower(),
umx_rename(),
umx_reorder(),
umx_score_scale(),
umx_select_valid(),
umx_stack(),
umx_strings2numeric(),
umx
df = umx_make_MR_data(10000)
str(df)
## Not run:
m1 = umxTwoStage(Y ~ X, ~qtl, data = df)
plot(m1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.