plot.jointSurroPenal {frailtypack}R Documentation

Plot Method for the one-step Joint surrogate model for the evaluation of a canditate surrogate endpoint.

Description

Plots estimated baseline survival and hazard functions for the surrogate endpoint and the true endpoint from an object of class 'jointSurroPenal'. Confidence bands are allowed.

Usage

## S3 method for class 'jointSurroPenal'
plot(x, type.plot = "Hazard", conf.bands=TRUE,
pos.legend = "topright", cex.legend=0.7, main, Xlab = "Time", 
Ylab = "Baseline hazard function", median = TRUE, xmin = 0, xmax = NULL, 
ylim = c(0,1), endpoint = 2, scale = 1, ...)

Arguments

x

An object inheriting from jointSurroPenal class (output from calling the function jointSurroPenal ).

type.plot

A character string specifying the type of curve. Possible value are "Hazard", or "Survival". The default is "Hazard". Only the first letters are required, e.g "Haz", "Su".

conf.bands

Logical value. Determines whether confidence bands will be plotted. The default is to do so.

pos.legend

The location of the legend can be specified by setting this argument to a single keyword from the list '"bottomright"', '"bottom"', '"bottomleft"', '"left"', '"topleft"', '"top"', '"topright"', '"right"' and '"center"'. The default is '"topright"'.

cex.legend

Character expansion factor *relative* to current 'par("cex")'. Default is 0.7.

main

Title of plot.

Xlab

Label of x-axis. Default is '"Time"'.

Ylab

Label of y-axis. Default is '"Baseline hazard function"'.

median

Logical value. Determines whether survival median will be plotted. Default is TRUE.

xmin

Minimum value for x-axis, the default is 0.

xmax

Maximum value for x-axis, the default is NULL.

ylim

Range of y-axis. Default is from 0 to 1.

endpoint

A binary that indicates the endpoint to represent. 0 for the surrogate endpoint, 1 for the true endpoint, and 2 for both surrogate endpoint and true endpoint. The default is 2.

scale

A numeric that allows to rescale (by multiplication) the survival times. If no change is need the argument is set to 1, the default value. eg: 1/365 aims to convert days to years .

...

other unused arguments.

Value

Print a plot of the baseline survival or hazard functions for each type of event or both with the confidence bands or not (conf.bands argument)

See Also

jointSurroPenal, jointSurroCopPenal

Examples



## Not run: 


###--- Joint surrogate model ---###
###---evaluation of surrogate endpoints---###

data(dataOvarian)
joint.surro.ovar <- jointSurroPenal(data = dataOvarian, n.knots = 8, 
                init.kappa = c(2000,1000), indicator.alpha = 0, 
                nb.mc = 200, scale = 1/365)

# Baseline Hazards fonctions for both the surrogate endpoint 
# and the true endpoint
plot(joint.surro.ovar,endpoint = 2,type.plot = "Haz", conf.bands = T)   

# Baseline survival fonctions for both the surrogate endpoint 
# and the true endpoint
plot(joint.surro.ovar,endpoint = 2,type.plot = "Su", conf.bands = T)  
             



## End(Not run)



[Package frailtypack version 3.6.2 Index]