All functions |
|
---|---|
Add confounder variables and their instruments |
|
Estimate allele frequency from SNP |
|
Create an arbitrary map |
|
Ascertain some proportion of cases and controls from binary phenotype |
|
Get vector of effects that explain some amount of variance |
|
Obtain 2x2 contingency table from marginal parameters and odds ratio |
|
Simulate two correlated binomial variables |
|
Wrapper for simulation pipeline |
|
Estimate the effects of all SNPs on all phenotypes |
|
Calculate expected MSE |
|
Expected se given beta, af, n and vy |
|
Calculate expected SSX |
|
Get summary statistics in simple linear regression |
|
Generate SNP effects given MAF, h2 and selection |
|
Modify SNP effects to account for LD |
|
Create a GWAS summary dataset |
|
Generate LD matrix objects from reference panel |
|
Get effs for two traits and make dat format |
|
Get LD matrix for a specified region from bfile reference panel |
|
Estimate the allele frequency in population from case/control summary data |
|
Determine regions from LD file |
|
Perform association of many SNPs against phenotype |
|
Translate risk from liability to probability scale |
|
Estimate haplotype frequencies for two loci |
|
Choose initial parameters for direct effects on X and Y |
|
Data frame of independent LD regions |
|
Estimate proportion of variance of liability explained by SNP in general population |
|
Create genotype matrix |
|
Take several exposures and one outcome and make the data required for multivariable MR |
|
Simulate variable based on the influences of other variables |
|
Organise outputs from |
|
Scale variable to have range between 0 and 1 |
|
Read in LD objects into list |
|
Recode data to make every effect on x positive |
|
Intercept recoding to have every effect on x positive |
|
Simple recoding to have every effect on x positive |
|
Plot liability vs probability disease risk |
|
Make simulation to compare disease and liability scales |
|
Sample beta values given standard errors |
|
Sample the actual effects based on initial parameters |
|
simulateGP: Functions for Simulating Genotype-Phenotype Relationships |
|
Simulate genotypes from haplotypes |
|
Simulate haplotypes of two loci |
|
Simulate individual level data from initial parameters |
|
General funcs |
|
Wrapper for generating a summary set |
|
Create test LD object |
|
Apply MR tests to system |
|
Convert continuous trait to binary |