View source: R/association_studies.R
test_association | R Documentation |
Function that can be used to test an association between two variables. It uses permutation testing functions from the coin package. It gives a consistent data frame output.
test_association(
dataset,
response.var,
explanatory.var,
stratum = NULL,
n.resample = 10^4,
...
)
dataset |
dataset (data frame format, original: data.wide) |
response.var |
response variable (for example Granulocytes_count) |
explanatory.var |
explanatory variable (for example Frailty.index) |
stratum |
blocking variables (character string) |
n.resample |
number of resamples |
... |
other variables that influence the coin::approximate function |
Note: Errors can occur when some groups within the blocking variables contain less than two observations. Note2: missing values are (silently) deleted.
data frame with results
test_association(immune_data, "Tregs", "Frailty.index", "Batch")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.