xwas: xwas

Description Usage Arguments Value Examples

View source: R/xwas.R

Description

Used to systematically perform an xlm across all variables. This function contains a lot of the logic for a systematic analysis including logic to determine variable characteristics.

Usage

1
2
xwas(data, depvar, timevar = NULL, varname = NULL, adjvars = c(),
  design = NULL, permute = 0, n = 1, verbose = TRUE)

Arguments

data

is the data.frame containing what to analyze.

depvar

is required and the outcome or dependent variable we are looking to analyze in the context of multiple factors.

timevar

is optional and if provided will be used in conjunction with the depvar to create a survival::Survey object for survival analysis.

varname

is optional and the independent variable, without being specified we will consider all variables. If it is provided there will only be 1 regression test performed.

adjvars

is optional and is a vector of a set of variables to adjust for under every condition, if not specified we will scan all variables without adjusting on a first pass.

design

a survey::svydesign object that has the experimental design.

permute

is the number of times to bootstrap each variable analysis in the xwas.

n

is the number of cores to use for the multi-core implementation, value must be > 1 or set to "MAX".

verbose

is a boolean to print extra information.

Value

A data.frame representing the output.

Examples

1
2
3
4
5
6
## Not run: 
xwas()
xwas(data=nhanes, depvar="LBXGLU")
xwas(data=nhanes, depvar="LBXGLU", adjvars=c("BMXBMI", "RIDAGEYR", "female"))

## End(Not run)

nampho2/xwas documentation built on May 23, 2017, 10:29 a.m.