histo_logit: Perform logistic regression for a binary/binarized trait

View source: R/logistic_reg_histology.R

histo_logitR Documentation

Perform logistic regression for a binary/binarized trait

Description

These functions were developed for the genetic analysis of cancer subtypes, where "histology" is considered the phenotype, and copy number the genotype. The association is carried out using logistic regresion by 'glm' using 'family = "binary"', as this recreates the standard model of quantitative genetics P = G + E. Alternate arguments of 'family' have no been tested.

Usage

histo_logit(
  cnr,
  trait,
  pheno0,
  pheno1,
  exclude.cluster = "HC",
  family = "binomial",
  na.action = "na.exclude",
  ...
)

Arguments

cnr

a cnr bundle

trait

character, name of the trait of interest to analyze. Must be a column in the phenotype matrix (Y). e.g. "binary1"

pheno0

character, phenotype(s) to use as baseline, e.g. "0"

pheno1

character, phenotype(s) to use as alternate, e.g. "1"

exclude.cluster

character, list of clusters to exclude, e.g. hypersegmented, Stroma, etc. Default "HC"

family

character, description of the error distribution and link function to be used in the model. See glm for details. Default "binomial"

na.action

character, handling of NA. default is "na.exclude"

...

additional arguments passed to glm

Value

a CNR object with results from a logistic regression analysis (family = "binomial") with effect estimates, and p-values attached to the chromInfo and gene.index matrices.

Results columns are "Estimate", "Std.Error", "z.value", "p.value", and "q.value"; with the phenotype comparison pre-apended as <pheno0>.vs.<pheno1>.lr.<value>. Using grade as an example the columns would be 0.vs.1.lr.Estimate, 0.vs.1.lr.Std.Error, 0.vs.1.lr.z.value, 0.vs.1.lr.p.value, 0.vs.1.lr.q.value.

Examples


data(cnr)

cnr <- histo_logit(cnr, trait = "binary1",
   pheno0 = 0, pheno1 = 1)

cnr <- histo_logit(cnr, trait = "category1",
   pheno0 = "A", pheno1 = c("B", "C"))

cnr <- histo_logit(cnr, trait = "category2",
   pheno0 = c("X", "Y"), pheno1 = "Z")


SingerLab/gac documentation built on Oct. 14, 2022, 4:09 a.m.