dce_nb: Differential Causal Effects for negative binomial data

View source: R/main.R

dce_nbR Documentation

Differential Causal Effects for negative binomial data

Description

Shortcut for the main function to analyse negative binomial data

Usage

dce_nb(
  graph,
  df_expr_wt,
  df_expr_mt,
  solver_args = list(method = "glm.dce.nb.fit", link = "identity"),
  adjustment_type = "parents",
  effect_type = "total",
  p_method = "hmp",
  test = "wald",
  lib_size = FALSE,
  deconfounding = FALSE,
  conservative = FALSE,
  log_level = logger::INFO
)

Arguments

graph

valid object defining a directed acyclic graph

df_expr_wt

data frame with wild type expression values

df_expr_mt

data from with mutation type expression values

solver_args

additional arguments for the solver function

adjustment_type

character string for the method to define the adjustment set Z for the regression

effect_type

method of computing causal effects

p_method

character string. "mean", "sum" for standard summary functions, "hmp" for harmonic mean or any method from package 'metap', e.g., "meanp" or "sump".

test

either "wald" for testing significance with the wald test or "lr" for using a likelihood ratio test

lib_size

either a numeric vector of the same length as the sum of wild type and mutant samples or a logical. If TRUE, it is recommended that both data sets include not only the genes included in the graph but all genes available in the original data set.

deconfounding

indicates whether adjustment against latent confounding is used. If FALSE, no adjustment is used, if TRUE it adjusts for confounding by automatically estimating the number of latent confounders. The estimated number of latent confounders can be chosen manually by setting this variable to some number.

conservative

logical; if TRUE, does not use the indicator variable for the variables in the adjustment set

log_level

Control verbosity (logger::INFO, logger::DEBUG, ...)

Value

list of matrices with dces and corresponding p-value

Examples

dag <- create_random_DAG(30, 0.2)
X.wt <- simulate_data(dag)
dag.mt <- resample_edge_weights(dag)
X.mt <- simulate_data(dag)
dce_nb(dag,X.wt,X.mt)

cbg-ethz/dce documentation built on Oct. 29, 2022, 8:14 a.m.