View source: R/adjusted_curve_test.r
plot.curve_test | R Documentation |
curve_test
Objects
Produces either a spaghetti-plot of the bootstrapped difference curves (type="curves"
) or a kernel-density plot of the shifted bootstrap distribution of the difference curve integrals (type="integral"
).
## S3 method for class 'curve_test'
plot(x, type="curves", xlab=NULL,
ylab=NULL, title=NULL, ...)
x |
An object of class |
type |
Either |
xlab |
The label of the X-Axis. Set to |
ylab |
The label of the Y-Axis. Set to |
title |
The title of the plot. Set to |
... |
Currently not used. |
When using type="curves"
the black curve shows the observed curve of the difference. When using type="integral"
the red line shows the observed integral of the curve of the difference.
Both graphics can be used to check if the assumptions of the test hold. The bootstrap-shifted distribution of the integral of the difference should approximately be normally distributed. If the kernel-density estimate shown with type="integral"
is clearly not normally distributed, the estimated p-value might be wrong. Similarly, if the curves of the differences do not vary randomly around the black line when using type="curves"
, the estimated p-value might be wrong. You could also try to rerun the adjustedsurv
or adjustedcif
function with a bigger number in n_boot
.
Returns a ggplot2
object.
Robin Denz
adjusted_curve_test
, adjustedsurv
, adjusted_rmst
# See ?adjusted_curve_test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.