ewaff.covariate.associations: Describe associations between covariates and the variable of...

View source: R/variable-summaries.r

ewaff.covariate.associationsR Documentation

Describe associations between covariates and the variable of interest.

Description

Describe associations between covariates and the variable of interest.

Usage

ewaff.covariate.associations(variable.of.interest, data)

Arguments

variable.of.interest

Name of the variable of interest in colnames(data).

data

Data frame of variables.

Value

A data frame with one or more rows for each covariate.

If both the variable of interest and covariate are continuous or ordinal, then the covariate uses one row showing the name, mean and standard deviation of the covariate following the significance of the association between the covariate and the variable of interest.

If the covariate is categorical, then there is additionally one row for each level showing the mean and standard deviation of the variable of interest for samples at that covariate level.

If the variable of interest is categorical but the covariate is not, then there is one row for each variable level showing the mean and standard deviation of the covariate at the given level.

If both the variable of interest and covariate are categorical, then mean is replaced with the number of samples at each pair of variable/categorical levels and standard deviation with the percentage. P-values indicate the significance of association using Fisher's exact test.


perishky/ewaff documentation built on Nov. 10, 2024, 4:53 p.m.