R/plot.survAUC.R

Defines functions plot.survErr plot.survAUC

Documented in plot.survAUC plot.survErr

plot.survAUC <- function(x, col="red", type="l", ylim=c(0,1),
					xlab="Time",ylab="AUC", main="Time-dependent AUC", add=FALSE, ...)
{
	if(!add){
		plot(x$times, x$auc, ylim=ylim, main=main, xlab=xlab, ylab=ylab, col=col, type=type, ...)
	}
	else{
	  graphics::lines(x$times, x$auc, col=col, ...)
	}
}





plot.survErr <- function(x, col="red", type="l", ylim=c(0,1),
xlab="Time",ylab="Prediction error", main="Time-dependent Prediction Error", add=FALSE, ...)
{
	if(!add){
		plot(x$times, x$error, ylim=ylim, main=main, xlab=xlab, ylab=ylab, col=col, type=type, ...)
	}
	else{
	  graphics::lines(x$times, x$error, col=col, ...)
	}
}

Try the survAUC package in your browser

Any scripts or data that you put into this service are public.

survAUC documentation built on March 31, 2023, 11:50 p.m.