Description Usage Arguments Value Author(s) Examples
The function takes a GenABEL object as input and generates simulated phenotypic values for related individuals having repeated obserevations.
1 2 3 |
formula.FixedEffects |
A formula including the name of the simulated variable as response, and cofactors as fixed effects. |
genabel.data |
A GenABEL object of class gwaa.data. |
n.obs |
A vector including the number of observations per individual. The length of n.obs must be equal to the number if individuals in genabel.data. |
SNP.eff |
The size of a simulated SNP.effect. |
SNP.nr |
The SNP genotype that the SNP effect is simulated on. SNP.nr=i is the i:th SNP. |
beta |
The simulated fixed effects. Must be equal to the number of cofactors simulated (including the intercept term). |
VC |
A vector of length 3 including the simulated variances of the polygenic effect, permanent environmental effect and residuals, respectively. |
GRM |
An optional input where the Genetic Relationship Matrix can be given. Otherwise it is computed using the GenABEL package. |
sim.gamma |
A logical parameter specifying whether the residuals shuld be simulated from a gamma distribution or not. If specified as TRUE then residuals are drawn from a gamma distribution with variance equal to the residual variance specified in |
Returns a data frame including the simulated phenotypic values, cofactors and IDs.
Lars Ronnegard
1 2 3 4 5 6 7 | data(gen.data)
#Simulate 4 observations per individual
set.seed(1234)
Phen.Sim <- simulate_PhenData(y ~ age, genabel.data=gen.data,
n.obs=rep(4, nids(gen.data)), SNP.eff=1, SNP.nr=1000, VC=c(1,1,1))
GWAS1 <- rGLS(y ~ age, genabel.data = gen.data, phenotype.data = Phen.Sim)
plot(GWAS1, main="Simulated Data Results")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.