01.Association02.Inferential tests - sporedata/researchdesigneR Wiki

1. Use cases: in which situations should I use this method?

They are used to compare two variables (or a variable vs. a population) as an initial exploratory analysis or explore unadjusted relations. Unadjusted relations are useful since they show "the world as it is" rather than exploring causes.

2. Input: what kind of data does the method require?

  1. Cross-sectional or longitudinal data
  2. Outcome and predictor variables

3. Algorithm: how does the method work?

Model mechanics

Data science packages

Suggested companion methods

Learning materials

  1. Books
  1. Articles

4. Output: how do I interpret this method's results?

For each of the tests below, there is a frequentist as well as a Bayesian version of the test.

Typical tables and plots and corresponding text description

sdatools::tableOne(Data, vars, strata), vars <- c("age", "gender","qol", "Diabetes"), strata <- c("Cancer")


outcomes <- c("qol")
predictors <- c("gender", "age")
confounders <- c()
expanalysis <- sdatools::ExplanatoryAnalysis(data, predictors, confounders, outcomes, split_predictors = TRUE,
preprocess_missing = FALSE,
preprocess_linear_combos = FALSE,
preprocess_nzv = FALSE,
preprocess_high_correlation = FALSE,
labels = NULL)


sdatools::boxPlot(patients,"age", strata)


* ScatterPlot   

sdatools::scatterPlot(patients,"age", "qol")


* Bar plot      

sdatools::barPlot(patients,"Cancer", "qol")


sdatools::stackedBarPlot(patients,"Cancer", "qol")


sdatools::piratePlot(patients,"Cancer", "qol")


Associated concepts

Inferential tests assist in providing suggested explanations for situations or phenomena shown in the clinic. It is also possible to draw conclusions and make inferences after analyzing data collected in surveys (data observed in clinical trials).

Reporting guidelines

Mock conclusions or most frequent format for conclusions reached at the end of a typical analysis.

5. SporeData-specific


Data science functions

General description

Clinical areas of interest

Variable categories

Linkage to other datasets


Related publications

SporeData data dictionaries

Mock conclusions or most frequent format for conclusions reached at the end of a typical analysis.


[1] Team SD. RStan: the R interface to Stan. R package version. 2016;2(1).
[2] Bürkner PC. Advanced Bayesian multilevel modeling with the R package brms. arXiv preprint arXiv:1705.11123. 2017 May 31.
[3] Stevenson M, Nunes T, Heuer C, Marshall J, Sanchez J, Thornton R, Reiczigel J, Robison-Cox J, Sebastiani P, Solymos P, Yoshida K. epiR: Tools for the analysis of epidemiological data. R package version 0.9-62.
[4] Faraone, Stephen V. 2008. “Interpreting Estimates of Treatment Effects: Implications for Managed Care.” P & T :A Peer-Reviewed Journal for Formulary Management 33 (12): 700–711. [5] World Health Organization. Metrics: population attributable fraction (PAF).