Functions for simulating genotype-phenotype relationships

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... |

dat_sign | Flip the signs in dat to positive exposure values |

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 |

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

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 the summary data so that everything is relative to... |

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 |

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.