diff --git a/R/basic_methods.R b/R/basic_methods.R index 6aa2e52..d7417c1 100644 --- a/R/basic_methods.R +++ b/R/basic_methods.R @@ -717,7 +717,7 @@ plot.predict_jm <- function (x, x2 = NULL, subject = 1, outcomes = 1, CI_long = TRUE, CI_event = TRUE, xlab = "Follow-up Time", ylab_long = NULL, ylab_event = "Cumulative Risk", main = "", - lwd_long = 2, lwd_event = 2, + lwd_long = 2, lwd_event = 2, ylim_event = c(0, 1), ylim_long_outcome_range = TRUE, col_line_long = "#0000FF", col_line_event = c("#FF0000", "#03BF3D", "#8000FF"), @@ -876,7 +876,8 @@ plot.predict_jm <- function (x, x2 = NULL, subject = 1, outcomes = 1, ry <- sort(fun_event(c(0, 1))) rx <- range(times, na.rm = TRUE) plot(rx, ry, type = "n", xlab = "", ylab = "", xlim = xlim, - axes = FALSE, col.axis = col_axis, col.lab = col_axis, ylim = ry) + axes = FALSE, col.axis = col_axis, col.lab = col_axis, + ylim = ylim_event) if (box) box(col = col_axis) axis(axis_side, cex.axis = cex_axis, col = col_axis, col.ticks = col_axis, col.axis = col_axis) diff --git a/man/predict.Rd b/man/predict.Rd index fc7a12c..218430b 100644 --- a/man/predict.Rd +++ b/man/predict.Rd @@ -24,7 +24,8 @@ Predict method for object of class \code{"jm"}. \method{plot}{predict_jm}(x, x2 = NULL, subject = 1, outcomes = 1, fun_long = NULL, fun_event = NULL, CI_long = TRUE, CI_event = TRUE, xlab = "Follow-up Time", ylab_long = NULL, ylab_event = "Cumulative Risk", - main = "", lwd_long = 2, lwd_event = 2, ylim_long_outcome_range = TRUE, + main = "", lwd_long = 2, lwd_event = 2, ylim_event = c(0, 1), + ylim_long_outcome_range = TRUE, col_line_long = "#0000FF", col_line_event = c("#FF0000", "#03BF3D", "#8000FF"), pch_points = 16, col_points = "blue", cex_points = 1, fill_CI_long = "#0000FF4D", @@ -103,6 +104,8 @@ subjects in \code{newdata}.} \item{pos_ylab_long}{controls the position of the y-axis labels when multiple longitudinal outcomes are plotted.} +\item{ylim_event}{the \code{ylim} for the event outcome.} + \item{ylim_long_outcome_range}{logical; if \code{TRUE}, the range of the y-axis spans across the range of the outcome in the data used to fit the model; not only the range of values of the specific subject being plotted.} \item{\dots}{aguments passed to control.}