Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

baseline.plot

Plot the simulated baseline functions


Description

This function is called by survsim.plot and is not intended to be used by itself.

Usage

baseline.plot(baseline)

Arguments

baseline

A data frame containing five variables: time, and the values of the baseline failure PDF, baseline failure CDF, baseline survivor function, and baseline hazard function at each time point. Generally, this data frame is taken from the baseline attribute of the sim.survdata function

Details

This function reshapes the data for easy faceting with facet_wrap within a call to ggplot. Each function is plotted on the y-axis and time is plotted on the x-axis using geom_line

Value

A figure of class "gg" and "ggplot"

Author(s)

Jonathan Kropko <jkropko@virginia.edu> and Jeffrey J. Harden <jharden2@nd.edu>

See Also

Examples

simdata <- sim.survdata(N=1000, T=100, num.data.frames=1)
baseline.plot(simdata$baseline)

coxed

Duration-Based Quantities of Interest for the Cox Proportional Hazards Model

v0.3.3
GPL-2
Authors
Kropko, Jonathan [aut, cre], Harden, Jeffrey J. [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.