LhrPlot.RdProduces a plot of log hazard ratios (lhr) for varying cut-values on a metric variabele, smoothed with lowess and a confidence band based on visreg asymptotics.
LhrPlot(DFR, TIMES, STATUS, METRIC, COLUMNS = NULL, SPANLOESS = 1/2, XLAB = NULL, YLAB = "log hasard ratio", MAIN = "Lhr plot", SUB = "Note: Lhr depends strongly on distribution")
| DFR | data.frame containing the time to event and metric variable |
|---|---|
| TIMES | name of variable in DFR: EITHER Time to event variable of class "Surv" OR time component of time to event |
| STATUS | name of variable in DFR: status component von time to event (needed only if TIMES is not of class "Surv") |
| METRIC | name of metric variable in DFR to be investigated |
| COLUMNS | = NULL vector of further covariate names in DFR != METRIC to adjust for in calculating the residuals. |
| SPANLOESS | =2/3 smoothing parameter for lowess smoother |
| XLAB | =NULL set range on x-axis label manually instead of automatically |
| YLAB | ="log hasard ratio" standard y-axis label |
| MAIN | =NULL for no main title set MAIN="" |
| SUB | ="Note: Lhr depends strongly on distribution", subtitle below XLAB |
produces a plot and returns a matrix of cuts and lhrs
LhrPlot