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.

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)
#> The total noise variance (noiseVar) is: 0
#> The noise model is: noNoise
#> The total genetic variance (genVar) is: 1
#> The genetic model is: geneticFixedOnly
#> Proportion of variance of genetic variant effects (h2s): 1
#> Proportion of variance of shared genetic variant effects (theta): 0.8
#> Proportion of genetic variant effects to have a trait-independent fixed effect (pIndependentGenetic): 0.4
#> Proportion of traits influenced by independent genetic variant effects (pTraitIndependentGenetic): 0.2
#> Proportion of non-linear phenotype transformation (proportionNonlinear): 0
#>
#genetic fixed and bg effects model <- setModel(genVar=1, h2s=0.01)
#> The total noise variance (noiseVar) is: 0
#> The noise model is: noNoise
#> The total genetic variance (genVar) is: 1
#> The genetic model is: geneticFixedAndBg
#> Proportion of variance of genetic variant effects (h2s): 0.01
#> Proportion of variance of shared genetic variant effects (theta): 0.8
#> Proportion of genetic variant effects to have a trait-independent fixed effect (pIndependentGenetic): 0.4
#> Proportion of traits influenced by independent genetic variant effects (pTraitIndependentGenetic): 0.2
#> Proportion of variance of infinitesimal genetic effects (h2bg): 0.99
#> Proportion of variance of shared infinitesimal genetic effects (eta): 0.8
#> Proportion of non-linear phenotype transformation (proportionNonlinear): 0
#>
#genetic and noise fixed effects only model <- setModel(genVar=0.4, h2s=1, delta=1)
#> The total noise variance (noiseVar) is: 0.6
#> The noise model is: noiseFixedOnly
#> Proportion of non-genetic covariate variance (delta): 1
#> Proportion of variance of shared non-genetic covariate effects (gamma): 0.8
#> Proportion of non-genetic covariates to have a trait-independent effect (pIndependentConfounders ): 0.4
#> Proportion of traits influenced by independent non-genetic covariate effects (pTraitIndependentConfounders): 0.2
#>
#> The total genetic variance (genVar) is: 0.4
#> The genetic model is: geneticFixedOnly
#> Proportion of variance of genetic variant effects (h2s): 1
#> Proportion of variance of shared genetic variant effects (theta): 0.8
#> Proportion of genetic variant effects to have a trait-independent fixed effect (pIndependentGenetic): 0.4
#> Proportion of traits influenced by independent genetic variant effects (pTraitIndependentGenetic): 0.2
#> Proportion of non-linear phenotype transformation (proportionNonlinear): 0
#>