transition_matrix_plot {caMST}R Documentation

Transition Matrix Plot


Given a transition matrix and the number of modules at each stage, produces a plot that demonstrates the potential paths through a (mixed) multistage test.


transition_matrix_plot(object = NULL, n_stages = NULL)



Either an S4 object of class '"MST"' or class '"MAT"', or a matrix describing how individuals can transition from one stage to the next. If an S4 object is provided, the 'transition.matrix' slot is used to create the plot.


A numeric value indicating how many stages are used in the (mixed) multistage test. If an S4 object is provided, this value is taken from the object and the input value is ignored.


A plot using the current graphic device.


# Create a plot for a multistage test with a 1-3-3 design
transition_matrix_plot(example_transition_matrix, n_stages =  3)

## Not run: 
# Save the plot as a png file.
png("Example 1-3-3 Transition Matrix Plot.png")
transition_matrix_plot(example_transition_matrix, n_stages = 3)
title("Transition Matrix for a 1-3-3 Design MST")

# Use the `results` object from the `mixed_adaptive_test()` example to create
# a transition matrix plot and save as a .pdf file.
pdf("MAT Transition Matrix.pdf")
title("Transition Matrix from the mixed_adaptive_test Example")

## End(Not run)

[Package caMST version 0.1.4 Index]