plot.rs.zph: Graphical Inspection of Proportional Hazards Assumption in...

plot.rs.zphR Documentation

Graphical Inspection of Proportional Hazards Assumption in Relative Survival Models

Description

Displays a graph of the scaled partial residuals, along with a smooth curve.

Usage

## S3 method for class 'rs.zph'
plot(
  x,
  resid = TRUE,
  df = 4,
  nsmo = 40,
  var,
  cex = 1,
  add = FALSE,
  col = 1,
  lty = 1,
  xlab,
  ylab,
  xscale = 1,
  ...
)

Arguments

x

result of the rs.zph function.

resid

a logical value, if TRUE the residuals are included on the plot, as well as the smooth fit.

df

the degrees of freedom for the fitted natural spline, df=2 leads to a linear fit.

nsmo

number of points used to plot the fitted spline.

var

the set of variables for which plots are desired. By default, plots are produced in turn for each variable of a model. Selection of a single variable allows other features to be added to the plot, e.g., a horizontal line at zero or a main title.

cex

a numerical value giving the amount by which plotting text and symbols should be scaled relative to the default.

add

logical, if TRUE the plot is added to an existing plot

col

a specification for the default plotting color.

lty

the line type.

xlab

x axis label.

ylab

y axis label.

xscale

units for x axis, default is 1, i.e. days.

...

Additional arguments passed to the plot function.

References

Goodness of fit: Stare J.,Pohar Perme M., Henderson R. (2005) "Goodness of fit of relative survival models." Statistics in Medicine, 24: 3911-3925.

Package: Pohar M., Stare J. (2006) "Relative survival analysis in R." Computer Methods and Programs in Biomedicine, 81: 272-278.

Relative survival: Pohar, M., Stare, J. (2007) "Making relative survival analysis relatively easy." Computers in biology and medicine, 37: 1741-1749, 2007.

See Also

rs.zph, plot.cox.zph.

Examples


data(slopop)
data(rdata)
fit <- rsadd(Surv(time,cens)~sex+as.factor(agegr),rmap=list(age=age*365.241),
             ratetable=slopop,data=rdata,int=5)
rszph <- rs.zph(fit)
plot(rszph)


relsurv documentation built on Dec. 28, 2022, 2:25 a.m.

Related to plot.rs.zph in relsurv...