plot.RTsurvival: plot Method for the object of class 'RTsurvival'

Description Usage Arguments References See Also Examples

View source: R/plot.RTsurvival.R

Description

This function plot the survival curves and divergence point much in line with the ones used in Reingold & Sheridan (2014).

Usage

1
2
3
4
## S3 method for class 'RTsurvival'
plot(x, dp.point, dif.plot = FALSE, add.arrows = FALSE,
  xlab = "Duration", ylab, legend = TRUE, legend.txt, legend.inset = 0.05,
  ...)

Arguments

x

An object of class RTsurvival

dp.point

(optional.) An object of class DPA or a numeric vector correspoinding to the divergence point.

dif.plot

logical. If TRUE, difference between two conditions rather than curves for each condition will be plotted. Default to FALSE.

add.arrows

logical. Only used when dp.point is supplied. If TRUE, an allow pointing to the divergence point and the corresponding value of divergence point will be printed. Defaul to FALSE.

xlab

A title used for the x axis.

ylab

A title used for the y axis.

legend

logical. If TRUE (default), legend will be printed.

legend.txt

character vector. If supplied, its element will be used for the legend.

legend.inset

distance of legend (placed in topright) from the margins.

...

Any other arguments to be passed to plotting methods. Currently ignored.

References

Reingold, E. M. & Sheridan, H. (2014). Estimating the divergence point: A novel distributional analysis procedure for determining the onset of the influence of experimental variables. Frontiers in Psychology. doi: 10.3389/fpsyg.2014.01432.

See Also

surv.mean, surv.curv, DPA.orig

Examples

1
2
3
4
data(DPAsample)
msc1 <- surv.mean(DPAsample$subject, DPAsample$duration, DPAsample$condition)
dp1 <- DPA.ci(DPAsample$subject, DPAsample$duration, DPAsample$condition)
plot(msc1, dp1, add.arrows = TRUE, legend.txt = c("Fast Condition", "Slow Condition"))

matsukik/RTsurvival documentation built on May 21, 2019, 12:57 p.m.