regression: Run initial association

Description Usage Arguments

View source: R/compute_associations.R

Description

Run initial association for a single feature

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
regression(
  j,
  independent_variables,
  dependent_variables,
  primary_variable,
  constant_adjusters,
  model_type,
  proportion_cutoff,
  family,
  ids,
  strata,
  weights,
  nest
)

Arguments

j

dependent feature name

independent_variables

A tibble containing the information for your independent variables (e.g. bacteria relative abundance, age). The columns should correspond to different variables, and the rows should correspond to different units, (e.g. individual1, individual2, etc). If passing multiple datasets, pass a named list of the same length and in the same order as the dependent_variables parameter. If running from the command line, pass the path (or comma separated paths) to .rds files containing the data, one per dataset.

dependent_variables

A tibble containing the information for your dependent variables (e.g. bacteria relative abundance, age). The columns should correspond to different variables, and the rows should correspond to different units, such as individuals (e.g. individual1, individual2, etc). If passing multiple datasets, pass a named list of the same length and in the same order as the independent_variables parameter. If running from the command line, pass the path (or comma separated paths) to .rds files containing the data, one per dataset.

primary_variable

The column name from the independent_variables tibble containing the key variable you want to associate with disease in your first round of modeling (prior to vibration). For example, if you are interested fundamentally identifying how well age can predict height, you would make this value a string referring to whatever column in said dataframe refers to "age."

constant_adjusters

A character vector (or just one string) corresponding to column names in your dataset to include in every vibration. (default = NULL)

model_type

Specifies regression type – "glm", "survey", or "negative_binomial". Survey regression will require additional parameters (at least weight, nest, strata, and ids). Any model family (e.g. gaussian()), or any other parameter can be passed as the family argument to this function.

proportion_cutoff

Float between 0 and 1. Filter out dependent features that are this proportion of zeros or more (default = 1, so no filtering done.)

family

GLM family (default = gaussian()). For help see help(glm) or help(family).

ids

Name of column in dataframe specifying cluster ids from largest level to smallest level. Only relevant for survey data. (Default = NULL).

strata

Name of column in dataframe with strata. Relevant for survey data. (Default = NULL).

weights

Name of column containing sampling weights.

nest

If TRUE, relabel cluster ids to enforce nesting within strata.


chiragjp/quantvoe documentation built on Oct. 11, 2021, 1:46 a.m.