correlationchords: A Circular Chord Diagram of Correlations

Version 18.0

October 4, 2024

Syntax

correlationchords
varlist,
mandatory_options
customlabel
(discrete_color_options | continuous_color_options)

Description

correlationchords is a highly customizable circular chord graph that visualizes the significance level obtained when performing an independence test for all possible combinations of two of a list of variables.

Program Limitations

1. Due to the complexity of the syntax of the program, it is recomended to run it through its dialog box.

2. Processing time for the variables increases quadratically depending on the number of variables to be analyzed. Therefore, graphs intended to check the relationship among a large list of variables may require a long time to calculate.

3. Users of the more basic versions of Stata (StataBE) should not have issues when analyzing 30 or fewer variables, but due to the variable limit, they may experience problems beyond this number.

4. correlationchords is not suitable for quantitative variables and should only be used for qualitative variables.

Options

Mandatory Options
test(string) Chooses the test whose p-value will be plotted:

chi2 uses Pearson’s χ² test.

exact1sided uses Fisher’s exact one-sided test.

exact2sided uses Fisher’s exact two-sided test.

startangle(#) Sets the position in degrees that the first variable will adopt on the circumference.

strength(#) Sets the strength with which the chords will be pulled towards the center of the circumference. It is recommended not to use values below 0.

labeldistance(#) Sets the distance from the center to the variable labels in radii of the circumference.

labelorientation(string) Sets the orientation of the labels:

perpendicular	orients the labels perpendicular to their radius.

parallel	orients the labels parallel to their radius.

labelcolor(string) Sets the color of the labels in RGB.

labelsize(string) Sets the size of the labels in pt.

colorscheme(string) Sets the color scheme that will be used to color the chords:

discrete colors the chords using up to 3 colors.

continuous colors the chords using a color gradient.

Custom Labels
customlabel(string) Uses custom labels. A blank space " " separates the labels. If case of labels with multiple words, group the words with quotation marks "". If left blank, the variable names will be used as labels.

Discrete Color Options
significationdiscrete(#) Sets the p-value threshold below which the chords will be displayed.

colordiscrete(string) Sets the color of the chord in RGB.

linewidthdiscrete(#) Sets the width of the chord in pt.

colordiscretesignificative(string) When present, it represents the chords with a significant p-value that also surpass the Bonferroni correction, applying this color to these chords in RGB.

linewidthdiscretesignificative(#) Sets the width of significant chords that surpass the Bonferroni’s correction if colordiscretesignificative is present.

colordiscretenotsignificative(string) When present, also displays chords with non-significant p-values, setting this color for these chords in RGB.

linewidthdiscretenotsignificative(#) Sets the width of non-significant chords if colordiscretenotsignificative is present.

Continuous Color Options
significationcontinuous(#) Sets the p-value threshold below or equal to which the chords will be displayed.

colorcontinuousmin(string) Sets the color of the chord when p = 0 in RGB.

linewidthcontinuousmin(#) Sets the width of the chord when p = 0 in pt.

colorcontinuousmax(string) Sets the color of the chord when p = significationcontinuous in RGB.

linewidthcontinuousmax(#) Sets the width of the chord when p = significationcontinuous in pt.

sensecontinuous(string) Sets the hue path along which the first color will transition to the second color:

short sets the shortest path, for example, from red to yellow through orange.

long sets the longest path, for example, from red to yellow, passing through violet, blue, and green.

legend When present, shows a legend with the color gradient.

Formulas

Bonferroni correction = p / (number of variables * (number of variables - 1) * 2)

Author

Emilio Domínguez-Durán, emilienko@gmail.com