Closed fmoradi1365 closed 5 years ago
Hi - thanks for your interest in the package.
From the documentation of the main simulation function:
?PhenotypeSimulator::runSimulation
[...]
genVar Proportion [double] of total genetic variance.
theta Proportion [double] of variance of shared genetic variant effects
h2s Proportion [double] of genetic variance of genetic variant effects.
h2bg Proportion [double] of genetic variance of infinitesimal genetic effects; either h2s or h2bg
have to be specified and h2s + h2bg = 1.
genVar
specifies how much of the total phenotypic variance is explained by genetics. So for instance, if you want 30% of your overall phenotypic variance to be genetic, set genVar=0.3
. The genetic variance includes direct genetic variant effects (h2s
) and infinitesimal genetic effects (h2bg
, often described as background, relatedness and kinship structure). Both genVar
and either h2s
or h2bg
have to be specified. Just as genVar
, h2s
and h2bg
are proportions, this time of the variance explained by genetics. If for instance you want 20% of your genVar
to be attributed to direct SNP effects, set h2s=0.2
. This means the total SNP variance of the phenotypes will be 0.3*0.2=0.06.
PhenotypeSimulator also offers to specify how the SNPs affect the traits you are simulating: they can either have the same effect across all traits, or different effects. theta
specifies the variance of the shared effects, for instance theta=0.3
means the SNP genetic variance explained is 30%, and total
phenotypic variance explained is 0.30.20.3=0.018.
The concept of the shared and independent effects is depicted in Figure 1 of the paper.
Hi Hannah,
Thank you very much for the explanation. So, I should call runSimulation function to be able to specify both genVar and theta parameters.
Yes, correct. These are both parameters accepted by runSimulation()
. Good luck with your simulations!
Hello,
I am using your PhenotypeSimulator package in my research and have a few questions:
On the second page of the paper you published in Bioinformatics, it is saying that "... a proportion $\theta$ is selected to be causal across all traits ...". However, I have difficulties understanding the role of $\theta$ in your simulation setting. Is it "genvar" parameter in your R codes? If so, should it be set to (number of causal SNPs) / (total number of SNPs)?
Many thanks for your time.