getNomogram: Get nomogram,standard curves and return related data and...

Description Usage Arguments Author(s) See Also Examples

View source: R/clinic_getNomogram.R

Description

Get nomogram,standard curves and return related data and formula

Usage

1
2
3
4
5
6
7
getNomogram(data, time.col, status.col, cluster, time.raw.type = c("Day",
  "Month", "Year")[1], time.target.type = c("Day", "Month", "Year")[2],
  time.knot = c(12, 24), dig = 9, nomo.width = 15,
  nomo.height = 12, nomo.xfrac = 0.45, standard.cmethod = c("hare",
  "KM")[2], standard.method = "boot", standard.nspot = 3,
  standard.names = "OS", standard.ylim = c(0, 1),
  standard.width = 10, standard.height = 10, names = "love1")

Arguments

data

a data frame

time.col

survival data colnames_time

status.col

survival data colnames_status

cluster

The vector of the marker values for which we want to compute the time-dependent ROC curves. Without loss of generality, the function assumes that larger values of the marker are associated with higher risks of events. If lower values of the marker are associated with higher risks of events, then reverse the association adding a minus to the marker values.

time.raw.type

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

time.target.type

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

time.knot

time knot to create survival probability

dig

Digits in nomogram plot.Default is 9.

nomo.width

width of nomogram plot

nomo.height

height of nomogram plot

nomo.xfrac

saved size of nomogram plot

standard.cmethod

cmethod of calibrate.One of 'hare' and 'KM'

standard.method

method of calibrate.Default is 'boot'.

standard.nspot

the number of predictive spots in standard curves.

standard.names

type of prediction.Like "OS".

standard.ylim

Default is c(0,1)

standard.width

parameters of output plot

standard.height

parameters of output plot

names

# part of file names.

Author(s)

Weibin Huang<654751191@qq.com>

See Also

calibrate;cph;nomogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
library(lucky)
library(survival)
data(lung)
data=lung
time.col = "time"
status.col = "status"
colnames(data)
cluster = c("sex","age","ph.ecog","ph.karno") #
time.raw.type=c("Day","Month","Year")[1]
time.target.type=c("Day","Month","Year")[2]
time.knot = c(12,24)
dig=9
standard.nspot = c(4,3)
width = 15
height = 12
xfrac=0.45
names = "love1"
standard.names = "OS"
standard.ylim = c(0,1)
standard.width = 10
standard.height = 10

## draw a nomogram and output related data and formula
warnings(list1 <- getNomogram(data,
                              time.col,
                              status.col,
                              cluster,
                              time.raw.type=c("Day","Month","Year")[1],
                              time.target.type=c("Day","Month","Year")[2],
                              standard.cmethod = "KM",
                              time.knot = c(12,24),
                              standard.nspot = c(4,3),
                              standard.names = "OS",
                              names = "love1"))

#more complex example
list1 <- getNomogram(data,
                     time.col,status.col,
                     cluster,
                     time.raw.type=c("Day","Month","Year")[1],
                     time.target.type=c("Day","Month","Year")[2],
                     time.knot = c(12,24),
                     dig=9,
                     nomo.width = 15,
                     nomo.height = 12,
                     nomo.xfrac=0.45,
                     standard.nspot = 3,
                     standard.names = "OS",
                     standard.ylim = c(0,1),
                     standard.width = 10,
                     standard.height = 10,
                     names = "love1")

## calculate a time-specified survival probability
S <- list1[["formula.nomo"]]
S(25) #25 months specified survival prediction.

## other information
View(list1[["data.nomo"]])
View(list1[["data.standard"]])

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.