getDCA2: ggplot style for decision estimate analysis

View source: R/clinic_getDCA2.R

getDCA2R Documentation

ggplot style for decision estimate analysis

Description

ggplot style for decision estimate analysis

Usage

getDCA2(
  data,
  group.by = NULL,
  time.col = "time",
  status.col = "event",
  clusters,
  time.raw.type = c("Day", "Month", "Year")[1],
  time.target.type = c("Day", "Month", "Year")[3],
  time.knot = c(3, 5),
  study.design = "cohort",
  population.prevalence = c(NA, NA),
  load.existed.res = F,
  plot.ntbft.by = c("group", "model")[1],
  plot.ntbft.ymin = NULL,
  plot.ntbft.ymax = NULL,
  width = 9,
  height = 7,
  add.bootc = T,
  add.cv = F,
  add.ci = T,
  plot.legend.position = "right",
  plot.type = c("time", "cluster", "disperse")[1],
  plot.label,
  parameter.label = c(all = "All positive", none = "All negative"),
  plot.family = "Arial",
  names = "project"
)

Arguments

data

a data frame with survival data(time & event)

group.by

group colname

time.col

colname of time value

status.col

Numeric.status.col must be a binary parameter with 0(event not happened yet) or 1(event happened) value.

clusters

list of characters.Some of the colnames of the data representing the value involving the glm model.

time.raw.type

one of "Day","Month","Year"

time.target.type

one of "Day","Month","Year"

time.knot

time knot to create survival probability

study.design

Either 'cohort' (default) or 'case-control' describing the study design used to obtain data. See details for more information.

population.prevalence

Outcome prevalence rate in the population used to calculate decision curves when study.design = 'case-control'.

load.existed.res

whether to use existed rds result in the work space

plot.ntbft.ymin

the ymin of plot.ntbft. Default is ymin=-0.05

plot.ntbft.ymax

the ymax of plot.ntbft. Default is ymax=max(nb[,c(nolines,nobands)],na.rm=T)

plot.legend.position

the position of plot legend

plot.type

Character. One/some of c("time","cluster","disperse"). if plot.type="time",then multiple clusters would be ploted for every time; if plot.type="cluster", then multiple times would be ploted for every cluster; if plot.type="disperse", then every single plot would be ploted indivitually.

plot.label

List. The name of list are the paste0 of elements in one of clusters with "-".The content of the list are the real names that would be printed in the plot legend/title.

parameter.label

the label of parameter label.

names

part of save files or plots.

Details

beta version

Value

ggplot style plot and result

Author(s)

Weibin Huang<654751191@qq.com>

Examples

## This is a simulative process and available only with CORRECT VARIABLES

huangwb8/luckyExperiment documentation built on June 29, 2023, 10:15 a.m.