Visualizing adverse events in clinical trials using correspondence analysis with R-package visae

Background Graphical displays and data visualization are essential components of statistical analysis that can lead to improved understanding of clinical trial adverse event (AE) data. Correspondence analysis (CA) has been introduced decades ago as a multivariate technique that can communicate AE contingency tables using two-dimensional plots, while quantifying the loss of information as other dimension reduction techniques such as principal components and factor analysis. Methods We propose the application of stacked CA using contribution biplots as a tool to explore differences in AE data among treatments in clinical trials. We defined five levels of refinement for the analysis based on data derived from the Common Terminology Criteria for Adverse Events (CTCAE) grades, domains, terms and their combinations. In addition, we developed a Shiny app built in an R-package, visae, publicly available on Comprehensive R Archive Network (CRAN), to interactively investigate CA configurations based on the contribution to the explained variance and relative frequency of AEs. Data from two randomized controlled trials (RCT) were used to illustrate the proposed methods: NSABP R-04, a neoadjuvant rectal 2 × 2 factorial trial comparing radiation therapy with either capecitabine (Cape) or 5-fluorouracil (5-FU) alone with or without oxaliplatin (Oxa), and NSABP B-35, a double-blind RCT comparing tamoxifen to anastrozole in postmenopausal women with hormone-positive ductal carcinoma in situ. Results In the R04 trial (n = 1308), CA biplots displayed the discrepancies between single agent treatments and their combinations with Oxa at all levels of AE classes, such that these discrepancies were responsible for the largest portion of the explained variability among treatments. In addition, an interaction effect when adding Oxa to Cape/5-FU was identified when the distance between Cape+Oxa and 5-FU + Oxa was observed to be larger than the distance between 5-FU and Cape, with Cape+Oxa and 5-FU + Oxa in different quadrants of the CA biplots. In the B35 trial (n = 3009), CA biplots showed different patterns for non-adherent Anastrozole and Tamoxifen compared with their adherent counterparts. Conclusion CA with contribution biplot is an effective tool that can be used to summarize AE data in a two-dimensional display while minimizing the loss of information and interpretation. Supplementary Information The online version contains supplementary material available at 10.1186/s12874-021-01368-w.


AE class
Treatment (  The next step would be to the define treatment profiles as relative frequencies, p ij = n ij /n .j for i = 1, . . . , I and j = 1, . . . , J. However, the column marginals in Table S1 are the total number of AE instead of the total number of patients, and investigators are interested in contingency tables with the patient as the sample unit. Therefore, we need to redefine the contingency table before proceeding to apply correspondence analysis. First, we calculate a relative frequency table for each AE class i given the total number of patients in each treatment as defined in Table S2.  where π ij = Nj l=1 I (n ijl >0) /N j is the relative frequency of AE i class for treatment T j , n ijl is the frequency of AE class i for patient l receiving treatment T j , and N j is the total number of patients receiving treatment T j for i = 1, . . . , I and j = 1, . . . , J. Then, AE class specific contingency tables such as Table S2 can be stacked generating an extended table for all AE classes.
Following Greenacre [?], we will apply CA on stacked tables such as Table S3. We define column profiles as relative frequencies for each treatment, Table S3. Although CA can be based either on column or row profiles, we will focus only on the analysis for column profiles. Both analyses are mathematically equivalent, but they lead us to different interpretations. The interpretation of Table S3 is asymmetric: we are interested in studying the differences in treatment profiles that lie in the space generated by the column profiles, which will be denoted as toxicity space.
The toxicity space has dimension K = min{I, J}, such that the vertices of such space are given by extreme treatment profiles, i.e., treatment profiles that have one as a relative frequency for AE class i and zero for all other AE classes for i = 1, . . . , I. The toxicity space can be understood using summary measures of location and dispersion as follows. First, we calculate column marginal relative frequencies, denoted as masses in CA, The masses associated with each treatment are the same, independent of the number of patients or number of AEs, which is desirable because there is no particular reason to give a higher weight for a specific group in our analysis. Although treatments are often equally randomized in clinical trials, we also can define groups as treatment adherent or non-adherent which will not have the same number of patients as will be discussed in the next section.
Then, the average toxicity profile is defined as the row marginal relative frequencies. It also can be calculated as a weighted average of treatment profiles (1) with weights given by the treatment masses (2), whereπ i. = 1 J J j=1 π ij . In CA, the distance of treatment profiles from the average profile is based on a weighted Euclidean distance known as the χ 2 -distance: Then, we can calculate the variability of treatment profiles as a weighted average χ 2 distance (4) of treatment profiles from the average, with weights given by their treatment masses (2). This is known as total inertia in CA and is given by which can be interpreted as the average total inertia for all AE classes. Therefore, any toxicity space can be summarized by the average (3) and variance (5) as in any statistical problem. As a next step, we can standardize the correspondence matrix P, where D c and D r are J × J and 2I × 2I diagonal matrices defined based on (2) and (3), respectively. The standardized residual treatment profiles (6) represent the differences in comparison to the average treatment profile assuming that groups were identical. Visualizing the standardized residuals treatment profiles in the toxicity space can give us insight regarding the association between treatments and AE classes. Nonetheless, it is not always feasible to display residual treatment profiles when the number of dimensions is greater than three, i.e., four treatment arms (J ≥ 4) or four AE classes (I ≥ 4). Moreover, distances between standardized residual treatment profiles are not simple to be evaluated even in a three dimensional space.
In this context, CA seeks the two-dimensional display that minimizes the weighted sum of χ 2 -distance (4) between the residual treatment profiles that lie in the Kdimensional toxicity space and their projection on a two-dimensional display candidate, where the weights are given by the treatment masses (2). The solution for this minimization problem is given by biplots [?]. The biplot for CA is defined based on the singular value decomposition of (6): where UU T = V T V = I K , such that U and V are J × K and 2I × K matrices, respectively, with each column in both matrices representing the dimension k of the toxicity space for k = 1, . . . , K. Furthermore, D α is the diagonal matrix of single values, such that K k=1 α 2 k is the total inertia given in (5); D c , D r are diagonal matrices with diagonals given by (2) and (3), respectively. Then, the asymmetric contribution biplot proposed by [?] will display two sets of dots: (a) dots representing treatment profiles with coordinates given by F = D −1/2 c UD α , which are denoted as principal coordinates; and dots representing AE classes with coordinates given by V, such that v 2 ik is the contribution of AE class i in dimension k for k = 1, . . . , K with The expected contribution of an AE class is the average contribution assuming that all AE classes have the same contributions, i.e., 1/I; the expected mass of an class is the average frequency assuming that all AE classes have the same frequency, i.e., 1/J.
Biplots show the main features of high dimensional data using only two dimensions (K = 2) while minimizing the loss of information. The first dimension of the biplot represents the direction with highest inertia (α 2 1 ) in the toxicity space and the second dimension corresponds to the direction with the second highest inertia (α 2 2 ). Adding up the inertia of the remaining dimensions ( K k=3 α 2 k ) allows us to quantify the loss of information of projecting the toxicity space into a two-dimensional plane. The inertia associated with each dimension (α 2 k ) can also be broken down in contributions (v 2 ik ) of each AE class for i = 1, . . . , I and k = 1, . . . , K. Therefore, we are able to compare treatment profiles based on the position of their dots relative to the origin, which represents the average treatment (3), and interpret each axis based on the position of dots associated with each AE class.
Finally, AE classes can be defined in Table S3 based on three levels of data aggregation: (a) AE grades, (b) AE domains, (c) AE terms and their combinations. While toxicity profiles can be presented and compared based on tables when AE classes are only defined by AE grades, it is a much more complex task when AE classes are defined by AE domains or AE terms, and their combinations with AE grades. There are 26 domains and 790 AE terms in CTCAE v4, which can generate 130 AE classes when AE domains are combined with AE grades and 3950 AE classes when AE terms are combined with AE grades.  Figure S2: Asymmetric contribution biplot for toy data -a. Interpreting AE classes (blue dots) and groups (red dots) relative to dimension 1 and dimension 2; b. Interpreting the distances among groups (red dots).         Table S11: Percentage (%) of selected AE term:grade classes at cycle 1 with contribution and mass at least 0.52% by treatment in B35 trial