7 Overlapping measures
7.1 Overlapping measures
For the following case study on using the FreesearchR tool, the following article will be used as an example: Damsbo et al. (2020).
This article includes a table of baseline characteristics, a regression table and an Euler plot of overlapping markers of poor mental health after stroke. Based on an anonymised dataset, the basics of each of these elements will be recreated in the following.
7.1.1 The Euler plot
The Euler plot is an area-accurate plot of overlapping features. This can be used to visualise how patients suffer from several diseases or how symptoms of mental health are overlapping.
Plotting the Euler plot is based on dichotomised categorical variables (2 levels). In the FreesearchR app, categorical variables can be created from continuous data.
7.1.2 Load the data
Start of by launching the FreesearchR app (click this link).
- Go to the “Get started” tab,
- under “Choose your data source”, select “Local or sample data”,
- then under “Select data source”, select “stRoke”, and
- then under “Select a dataset”, select “trial”.
This should load the data, and you can press the “Quick overview” to preview the data classes and missing values.
In the section “Select variables for final import”, you can decide to set a missingness threshold and specify variables to initially include. Leaves these options at the default for now. For this exercise, just include all variables.
7.1.3 Baseline characteristics
See “Baseline characteristics” on how to create a baseline characteristics table.
7.1.4 Plotting
Now on to the plotting. I will start by showing how to visualise the overlapping features of hypertension, diabetes and living alone:
- Open the “Visuals” panel,
- select “hypertension” as the “Response variable” to see plotting options, and
- select “Euler diagram” and
- select “diabetes” and “cohabitation” as “Additional variables”,
- click “Plot”.
7.1.4.1 Creating categorical variables
If you want to create new dichotomous (2-level categorical) variables from continuous data, then follow the below steps (as an exaple the “mfi_6” variable will be used):
- Go to “Prepare” -> “Edit and create data”, the
- select “New factor” (factor is the technical term for a categorical variable), and then
- in the pop-up window, under “Variable to cut”, select “mfi_6”,
- keep the “Method” “fixed”, and choose “2” under “Number of breaks” to create a categorical variable with 2 levels.
- Select the cut-off between the two levels to 12 for the “mfi_6” variable, and then
- click “Create factor variable”.
A new variable called “mfi_6_cut” is now created. Repeat the above steps for other variables you want to cut.
7.1.4.2 (Re)ordering categorical variables
Some scoring systems are designed to have a higher score correspond to worse outcome and others are opposite. To specify the order of the categorical levels and allow for correct plotting with the Euler plot (the plots the first level), follow these steps:
- While in the same panel (“Prepare” -> “Edit and create data”), click the “Reorder factor levels”, and
- order the levels with the first level at the top (drag in the small 3x3 dot grid to the left of the level names), and then
- click “Update factor variable”
7.1.5 Now its time for experimentation
- Try create categorical variables from the age variable to create a baseline table grouped by age below or above 70.
- Create an Euler diagram of age (below/above 70), cohabitation and male sex.
- Create and Euler diagram of MFI, MDI (cut-off at 20) and WHO (cut-off at 17). Please note the the WHO should range from 0-100, but the included variable is scaled down by a factor of 4 and ranges 0-25.
- …