Plots a bar graph of decomposition of FORP by cause of admission
plot_decomp(
decomp1,
decomp2,
threshold,
labels,
inc_died = TRUE,
mar_scale = 1
)
No return value, draws a figure
matrix for first group; see specification in description
matrix for second group; see specification in description
score threshold to plot (between 0 and 1)
labels for group 1 and group 2
set to TRUE to include a second panel showing 'death' type admissions
scale margins by this amount. Also scales legend.
Takes two matrices as input with the following specifications: Each matrix corresponds to one group Columns are named with the admission types to be plotted. Any admission types including the string 'Died' are counted as deaths If the matrix has N rows, these are interpreted as corresponding to N score quantiles The (i,j)th entry of the matrix is the number of people admitted for reason i with a score greater than or equal to (j-1)/N and less than (j/N) who are in that group