Functions for simulating genotype-phenotype relationships

add_u | Add confounder variables and their instruments |

allele_frequency | Estimate allele frequency from SNP |

ascertain_samples | Ascertain some proportion of cases and controls from binary... |

choose_effects | Get vector of effects that explain some amount of variance |

contingency | Obtain 2x2 contingency table from marginal parameters and... |

create_system | Wrapper for simulation pipeline |

estimate_system_effects | Estimate the effects of all SNPs on all phenotypes |

expected_gwas | For known effect size, sample size and variances, what is the... |

fast_assoc | Get summary statistics in simple linear regression |

get_effs | Get effs for two traits and make dat format |

get_population_allele_frequency | Estimate the allele frequency in population from case/control... |

gwas | Perform association of many SNPs against phenotype |

gx_to_gp | Translate risk from liability to probability scale |

init_parameters | Choose initial parameters for direct effects on X and Y |

lor_to_rsq | Estimate proportion of variance of liability explained by SNP... |

make_dat | Organise outputs from 'gwas' into harmonised dat format |

make_geno | Create genotype matrix |

make_mvdat | Take several exposures and one outcome and make the data... |

make_phen | Simulate variable based on the influences of other variables |

range01 | Scale variable to have range between 0 and 1 |

recode_dat | Recode data to make every effect on x positive |

recode_dat_intercept | Intercept recoding to have every effect on x positive |

recode_dat_simple | Simple recoding to have every effect on x positive |

risk_cross_plot | Plot liability vs probability disease risk |

risk_simulation | Make simulation to compare disease and liability scales |

sample_system_effects | Sample the actual effects based on initial parameters |

simulate_population | Simulate individual level data from initial parameters |

y_to_binary | Convert continuous trait to binary |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.