cox.arry: Cox Array Main Function

Description Usage Arguments Details Value Examples

Description

This is the main access point for using parallel processing to complete numerous Cox regressions simultaneously.

Usage

1
cox.arry(proteins, data, time, outc, adjust, .src)

Arguments

proteins

This is the vector of all proteins to be considered for Uniprotein, Adjusted Cox Regressions.

data

This is the tibble dataframe with the covariates for regression

time

This is a character vector of the Survival time to event Outcome.

outc

This is a character vector of the Survival event indicator Outcome.

adjust

This is a vector of all the adjustment variables.

.src

This is an indicator of whether the models are the derivation or validation models. It is 1 when the data is the derivation dataset, and 2 when it is the validation dataset.

Details

This function utilizes the furrr::future_map() function to complete many regressions quickly. Each protein is regressed individually against the time and outcome variable specified, while adjusted for the provided variables.

The .src input is specified to distinguish data between derivation data and validation data. Derivation data should be .src = 1 while validation data should be .src = 2.

Value

a Tibble containing the results of the multiple regression models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
  data <- haven::read_dta('~/proteomics/studydata.dta') %>% ...
      (merge study data with SomaData, see [get.visit()] for specifics)

  univariate.results <- cox.arry(labels$term, data,
                                 time = "fuptime",
                                 outc = "hfdiag",
                                 adjust = adjust,
                                 .src = 1)

 validation.results <- cox.arry(labels$term, data.validation,
                                 time = "fuptime",
                                 outc = "hfdiag",
                                 adjust = adjust,
                                 .src = 2)


## End(Not run)

pranavdorbala/proteomicsHF documentation built on March 9, 2021, 12:22 a.m.