valorate.plot.empirical: PLOT THE SAMPLED (EMPIRICAL) LOG-RANK DISTRIBUTION

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Plots the estimated density of the log-rank distribution.

Usage

1
2
3
valorate.plot.empirical(vro, n1, vstat, type, log, add, include, xlab, ylab, 
	main, samp, smooth, legends, shades, transparency, lwd, xlim, 
	minL=NA, minR=NA, ...)

Arguments

vro

the valorate object.

n1

the size of the 'mutated' or interested survival group. It can be also the numerical/logical 'x' vector as in valorate.survdiff in which case n1 and vstat are estimated.

vstat

log-rank statistic. If provided, a vertical mark on this value is shown and both sides of the density are filled to highlight areas.

type

typical plot parameter: "p"=points, "l"=lines (default), "o"=overlap.

log

typical plot parameter : specify which axis are shown in logarithm base 10.

add

typical plot parameter : specify whether the plot is new or added to an existing one.

include

specify which other estimations are included. This is experimental. Default "none", possibles: "none","gaussian","beta","weibull","all".

xlab

typical plot parameter: how the x axis is labelled, the default is "valorate LR".

ylab

typical plot parameter: how the y axis is labelled, the default is "density".

main

typical plot parameter. The default is an expression depending on the parameters.

samp

a numeric value specifying the length of sampling when using other density functions. It is related to the include argument.

smooth

the strength of density smoothing for display purposes. The default is 10.

legends

logical value that defines whether the legends for each curve should be displayed. The default is FALSE.

shades

define de colors used to shade the empirical distribution when the either 'vstat' argument is used or n1 represent the 'x' vector. The default is c(6,8).

transparency

defines the transparency in shades. The default is 0.25.

lwd

typical plot parameter: width of the lines. Default is 2.

xlim

typical plot parameter.

minL,minR

limits to the estimated empirical density.

...

arguments passed to plot.

Details

Plots the estimated density of the log-rank distribution.

Value

An invisible data frame of the density estimation.

Author(s)

Victor Trevino vtrevino@itesm.mx

References

Trevino et al. 2016 http://bioinformatica.mty.itesm.mx/valorateR

See Also

new.valorate. valorate.p.value. valorate.plot.empirical.

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
## Create a random population of 100 subjects 
## having 20 events
subjects <- numeric(100)
subjects[sample(100,20)] <- 1
vo <- new.valorate(rank=subjects, sampling.size=100000, verbose=TRUE)

groups <- numeric(100)
groups[sample(100,4)] <- 1  # only 4 subjects are within the 'mutated' group
pvr <- valorate.survdiff(vo, groups) 
print(pvr)

# Crude density
## Not run: valorate.plot.empirical(vo, 4)

# Similar but marking the statistic 
# returned by groups and shading
## Not run: valorate.plot.empirical(vo, groups)

# Plot density and check symmetry
## Not run: valorate.plot.empirical(vo, 4, 0)

# Now should be almost symmetric
## Not run: valorate.plot.empirical(vo, 50, 0)

# Crude density plus gaussian, weibull, and beta estimations
## Not run: valorate.plot.empirical(vo, 4, include="all", legends=TRUE)

valorate documentation built on May 1, 2019, 9:10 p.m.