Maraca Plots - Alternative Endpoints

Monika Huhn

2024-03-18

The maraca package can also be used for hierarchical endpoints containing other type of endpoints than time-to-event and continuous. Currently binary endpoints are also supported with further type of endpoints under development

Binary endpoints

Last outcome

First we go through an example where the final outcome instead of being continuous, is a binary outcome. As an example, this could for example be weight loss above a certain threshold at the end of the study. The way the outcome should be included in the data is as a numeric vector with 1 for those patients that had the outcome and 0 for those that had not.

We do not have any example dataset with a final binary endpoint included in the package, so for this vignette we modify an existing dataset:

If we now want to create a maraca object for this data, we need to slightly update the default code. By default, maraca expects the last outcome to be continuous. In order for the function to know that the last outcome is binary, we have to update the parameter last_type. The parameter currently accepts the inputs "binary" and "continuous".

The maraca object can now be plotted. A binary endpoint is plotted as an ellipsis. The point in the middle of the ellipsis indicates the proportion that has met the binary endpoint. The width of the ellipsis (x-axis range) shows the confidence interval. Specifying vline_type = "mean" (the default) will add vertical lines indicating the proportions in each treatment group for easier readibility. Note that vline_type = "median" (the default for continuous endpoints) will result in an error. The same is true for setting density_plot_type to anything other than "default".

Step outcome

What if the binary outcome is not the last outcome of the hierarchical endpoint but rather one (or several) of the previous outcomes? So rather than solely having time-to-event endpoints within the step function part of the plot, we also have at least one binary (so not time depending) variable. To include a binary variable, we expect the data for this outcome to include only patients that had the outcome and they all have to have the original analysis value 1.

Let’s create a dataset with 2 binary outcomes.

Again we need to slightly update the default code if we want to create a maraca object for this data. By default, maraca expects all the step outcomes to be time-to-event endpoints. In order for the function to know that there are binary outcomes, we have to update the parameter step_types. The parameter currently accepts the inputs "binary" and "tte". If all the step outcomes are of the same type, the user can give the type as a string (such as by default step_types = "tte"). If there are different endpoint types, then the user has to provide a vector with one element for each step outcome. Similarly, the fixed-follow up time can be given as a single number or a vector. Note that the fixed-follow-up time is only needed for time-to-event endpoints, so if providing a vector then it should contain one value for each time-to-event endpoint.

Again, we can plot the final object.

As with all maraca objects, the different plotting parameters can be used.

Also, the win odds plots can be created as usual.