TestSingleRegion: Test associations between phenotype and RNA editing levels.

Description Usage Arguments Details Value Examples

View source: R/TestSingleRegion.R

Description

Test associations between phenotype and RNA editing levels in a single site or summarized RNA editing levels in a single region.

Usage

1
2
3
4
5
TestSingleRegion(
  rnaEdit_num,
  modelPrep_ls,
  respType = c("binary", "continuous", "survival")
)

Arguments

rnaEdit_num

A named numeric vector of (summarized) RNA editing level values with sample IDs as names.

modelPrep_ls

A list includes modelFormula_char which is created by function MakeModelFormula, pheno_df which is the input phenotype data frame in TestAssociations, and minSize (minimum sample size per group to use regular logistic regression) which is created by function CountSamplesPerGroup when respType is "binary".

respType

Type of outcome. Defaults to "binary".

Details

minSize is used by function TestSingleRegion to decide on whether to use regular logistic regression or Firth corrected logistic regression ("https://www.jstor.org/stable/2336755").

Value

a dataframe with test statistics (estimate, stdErr, pValue or coef, exp_coef, se_coef, pValue).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  data(rnaedit_df)
  
  exm_pheno <- readRDS(
    system.file(
    "extdata",
    "pheno_df.RDS",
    package = 'rnaEditr',
    mustWork = TRUE
    )
  )
  
  exm_model <- list(
    modelFormula_char = "age_at_diagnosis ~ rnaEditSummary",
    pheno_df = exm_pheno,
    minSize = NULL
  )
  
  TestSingleRegion(
    rnaEdit_num = unlist(rnaedit_df[2,]),
    modelPrep_ls = exm_model,
    respType = "continuous"
  )

rnaEditr documentation built on Nov. 8, 2020, 8:26 p.m.