plotINT {interactionRCS}R Documentation

Plot the result of HR, OR or linear estimates

Description

Create a spline var2 by 1 unit increase of var1

Usage

plotINT(
  x,
  xlab = "",
  main = "",
  log = FALSE,
  ylab = NULL,
  line1 = TRUE,
  linecolor = "dodgerblue",
  cicolor = "darkgray",
  ...
)

Arguments

x

data.frame calculated using any of the function of this package

xlab

xlab name

main

plot title

log

if TRUE, plot the estimate in log scale

ylab

ylab name. Default is the estimate column name if log=FALSE otherwise Estimate(log scale)

line1

if TRUE, plot horizontal line on 1 or 0 (if log=TRUE)

linecolor

line color. Default dodgerblue

cicolor

confidence intervals color. Default gray

...

other parameters for plot

Value

simple pspline smoothed splined plot of estimates of 1 unit increase in var1 at var2 values

Examples

library(rms)
library(survival)
data(cancer)
myformula <- Surv(time, status) ~ ph.karno + ph.ecog + rcs(age, 3)*sex
model <- cph(myformula , data = lung )
myHR <- rcsHR( var2values = 40:80
               , model = model , data = lung , var1 ="sex", var2="age"
               , ci=TRUE , conf = 0.95 , ci.method = "delta")
plotINT(myHR , ylab = "HR of male VS female" , xlab = "Age")

[Package interactionRCS version 0.1.1 Index]