
Last chance! 50% off unlimited learning
Sale ends in
This function produces a circular plot for subgroup analysis using the circlize package. Overlaps across all variables are displayed in a matrix layout.
plot_circle2(
dat,
covari.sel,
trt.sel,
resp.sel,
outcome.type,
range.v = NULL,
adj.ann.subgrp = 4,
range.strip = c(-3, 3),
n.brk = 31,
n.brk.axis = NULL,
font.size = c(1, 1, 0.85, 0.85, 1),
title = NULL,
lab.xy = NULL,
strip = "Treatment effect size",
effect = "HR",
equal.width = TRUE,
show.KM = FALSE,
show.effect = TRUE,
conf.int = TRUE,
palette = "divergent",
col.power = 0.5,
nrow = 2,
ncol = 4
)
a data set
a vector of indices of the two covariates
a covariate index specifying the treatment code
a covariate index specifying the response variable
a string specifying the type of the response variable, it can be "continuous", or "binary" or "survival".
a vector specifying the vertical range of graphical display.
a parameter adjusting the distance between a point and its corresponding subgroup label. The smaller the value is, the larger the distance is.
a vector with two elements specifying the range of treatment effect size for display
a number specifying the number of the points dividing the range of the argument "range.strip".
a number specifying the number of breakpoints dividing the axis of the argument "range.strip".
a vector specifying the size of labels and text; the first element is for the main title, the second is for for x-axis and y-axis labels; the thrid is for the legend text of subgroups; the fourth is for the subgroup labels near points; the fifth is for the unit labels on all the axes.
a string specifying the main title.
a list of two strings specifying the labels of the x and y axes.
a string specifying the title of the colour strip.
either "HR" or "RMST". only when outcome.type = "survival"
A logical indicating whether the sectors should have equal width or proportional to their sample sizes
A logical indicating whether to show the Kaplan-Meier curves for the subgroups
A logical indicating whether to show the treatment effect
A logical indicating whether to show confidence intervals for the treatment effect.
either "divergent" or "hcl"
to be used when palette = "hcl". see colorspace package for reference
Number of rows in the matrix layout
Number of columns in the matrix layout
# NOT RUN {
# Load the data to be used
data(prca)
dat <- prca
set.seed(12)
plot_circle2(dat,
covari.sel = c(4, 5, 6, 7),
trt.sel = 3,
resp.sel = c(1,2),
outcome.type = "survival",
range.v = NULL,
adj.ann.subgrp = 4,
range.strip=c(-3, 3),
n.brk = 31,
n.brk.axis = 7,
font.size = c(1, 1, 0.85, 0.85, 1),
title = NULL, lab.xy = NULL,
strip = "Treatment effect size (log hazard ratio)",
effect = "HR",
equal.width = FALSE,
show.KM = FALSE,
show.effect = TRUE,
conf.int = FALSE, palette = "hcl")
# }
Run the code above in your browser using DataLab