Learn R Programming

AllelicSeries (version 0.1.1.5)

GenPheno: Generate Phenotypes

Description

Simulate a phenotype based on annotations, covariates, and genotypes.

Usage

GenPheno(
  anno,
  beta,
  covar,
  geno,
  reg_param,
  binary = FALSE,
  include_residual = TRUE,
  indicator = FALSE,
  method = "none",
  prop_causal = 1,
  random_signs = FALSE,
  random_var = 0,
  weights = c(1, 1, 1)
)

Value

(n x 1) numeric vector.

Arguments

anno

(snps x 1) annotation vector.

beta

If method = "none", a (L x 1) coefficient with effect sizes for each annotation category. By default, there are L = 3 annotation categories corresponding to BMVs, DMVs, and PTVs. If method != "none", a scalar effect size for the allelic series burden score.

covar

Covariate matrix.

geno

(n x snps) genotype matrix.

reg_param

Regression parameters.

binary

Generate binary phenotype? Default: FALSE.

include_residual

Include residual? If FALSE, returns the expected value. Intended for testing.

indicator

Convert raw counts to indicators? Default: FALSE.

method

Genotype aggregation method. Default: "none".

prop_causal

Proportion of variants which are causal.

random_signs

Randomize signs? FALSE for burden-type genetic architecture, TRUE for SKAT-type.

random_var

Frailty variance in the case of random signs. Default: 0.

weights

Annotation category weights used for aggregation if method != "none".

Phenotype generation

  • To generate phenotypes from the baseline model, set method to "none" and provide a vector beta of length equal to the number of annotation categories specifying the effect sizes of each.

  • To generate phenotypes from the allelic series burden models, set method to "max" or "sum" and provide a scalar beta.

  • To generate phenotypes from the allelic series SKAT model, set method to "none", set random_signs to true, and provide a vector beta of length equal to the number of annotation categories.