Learn R Programming

SimHaz (version 0.1)

plot_simuData: Make an incidence plot from simulated data.

Description

Create an incidence plot ordered by follow-up time from a survival data simulated.

Usage

plot_simuData(data, title="Sample Survival Data")

Arguments

data
A dataframe of survival data containing the following columns: id, start, stop, status, x
title
Title of the graph

Details

This makes the incidence plot of the survival data based on the input dataframe from the tdSim.method1 or tdSim.method2 function. More generally, this function would also works with a dataframe containing survival data with the same columns name as indicated above.

Examples

Run this code
dat <- tdSim.method2(500, duration=24,lambda12=1.3,lambda23=0.04, 
    lambda13=0.03, exp.prop=0.2,rateC=0.05, min.futime=4, min.postexp.futime=4)
	
plot_simuData(dat, title='method2_filter')

Run the code above in your browser using DataLab