setModel {PhenotypeSimulator} | R Documentation |
Set simulation model.
Description
Based on parameters provided, this function sets the name for the phenotype simulation. It carries out compatibiltiy checks of the specifie parameters and checks for any missing information.
Usage
setModel(
genVar = NULL,
h2s = NULL,
theta = 0.8,
h2bg = NULL,
eta = 0.8,
noiseVar = NULL,
delta = NULL,
gamma = 0.8,
rho = NULL,
phi = NULL,
alpha = 0.8,
pcorr = 0.6,
pIndependentConfounders = 0.4,
pTraitIndependentConfounders = 0.2,
pIndependentGenetic = 0.4,
pTraitIndependentGenetic = 0.2,
proportionNonlinear = 0,
cNrSNP = NULL,
NrConfounders = 10,
verbose = TRUE
)
Arguments
genVar |
Total genetic variance [double]. |
h2s |
Proportion [double] of variance of genetic variant effects. |
theta |
Proportion [double] of variance of shared genetic variant effects. |
h2bg |
Proportion [double] of variance of infinitesimal genetic effects i.e. correlation introduced by sample kinship). |
eta |
Proportion [double] of variance of shared infinitesimal genetic effects. |
noiseVar |
Total noise variance [double]. |
delta |
Proportion [double] of variance of non-genetic covariate effect. |
gamma |
Proportion [double] of variance of shared non-genetic covariate effects. |
rho |
Proportion [double] of variance of correlated noise effects. |
phi |
Proportion [double] of variance of observational noise effects. |
alpha |
Proportion [double] of variance of shared observational noise effect. |
pcorr |
Correlation [double] between phenotypes. |
pIndependentConfounders |
Proportion [double] of non-genetic covariate to have a trait-independent effect. |
pTraitIndependentConfounders |
Proportion [double] of traits influenced by independent non-genetic covariate effects. |
pIndependentGenetic |
Proportion [double] of genetic variant effects to have a trait-independent fixed effect. |
pTraitIndependentGenetic |
Proportion [double] of traits influenced by independent genetic variant effects. |
proportionNonlinear |
[double] proportion of the phenotype to be non- linear |
cNrSNP |
Number [integer] of causal SNPs; used as genetic variant effects. |
NrConfounders |
Number [integer] of non-genetic covariates; used as non-genetic covariate effects. |
verbose |
[boolean]; If TRUE, progress info is printed to standard out. |
Value
Named list containing the genetic model (modelGenetic), the noise model (modelNoise) and the input parameters (h2s, h2bg, noiseVar, rho, delta, phi, gamma, theta, eta, alpha, pcorr, proportionNonlinear). Model options are: modelNoise: "noNoise", "noiseFixedOnly", "noiseBgOnly", "noiseCorrelatedOnly", "noiseFixedAndBg","noiseCorrelatedAndBg", "noiseFixedAndCorrelated", "noiseFixedAndBgAndCorrelated" modelGenetic: "noGenetic","geneticBgOnly", "geneticFixedOnly", "geneticFixedAndBg"
Examples
#genetic fixed effects only
model <- setModel(genVar=1, h2s=1)
#genetic fixed and bg effects
model <- setModel(genVar=1, h2s=0.01)
#genetic and noise fixed effects only
model <- setModel(genVar=0.4, h2s=1, delta=1)