testing_assoc: Function that tests for associations and returns results....

Description Usage Arguments Value Examples

Description

Function that tests for associations and returns results. DOES NOT merge with gene info, for use with tpm datasets. This function will do a single linear regression and extract the coefficients from the regression.

Usage

1
2
testing_assoc(lm_full,
  to_correct = "+ as.factor(covariates$SEX) + as.numeric(covariates$AGE)+ as.numeric(covariates$RACE) + covariates$PC1 + covariates$PC2 +covariates$PC3+ covariates$PC4 + covariates$PC5 + covariates$PC6 + covariates$PC7 + covariates$PC8 + covariates$PC9 + covariates$PC10")

Arguments

lm_full

The data frame containing genes, covariates, and mtDNA-CN info

to_correct

A string containing additional covariates to correct for. ex: '+as.factor(covariates$DTHHRDY)+as.factor(covariates$RACE)'

lm_data

Our dependent variables. Column = dependent variable, rows = observations (in this case, individuals) (numeric vector)

Value

Coefficients from the regression

Examples

1
lm_results <- testing_assoc(lm_full)

syyang93/analyzeR documentation built on Aug. 26, 2020, 4:34 p.m.