Skip to content

Commit

Permalink
ste is NA when uprl does not cross HR=1
Browse files Browse the repository at this point in the history
  • Loading branch information
federicorotolo committed Jun 9, 2017
1 parent eea1255 commit c87265e
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,26 @@ plot.predictSurrosurv <- function(x,
...
)
if (show.ste) {
points(STE[i],
0,
col = 2,
pch = '|',
font = 2)
text(
STE[i],
0,
col = 2,
font = 2,
adj = c(1.1, -.5),
labels = paste('STE =', round(exp(STE[i]), 2))
)
if (is.na(STE[i])) {
message(paste0(
'[', format.methodNames(x)[i],
'] The STE does not exist: the upper limits ',
'of the prediction intervals never cross the line HR=1'))
} else {
points(STE[i],
0,
col = 2,
pch = '|',
font = 2)
text(
STE[i],
0,
col = 2,
font = 2,
adj = c(1.1, -.5),
labels = paste('STE =', round(exp(STE[i]), 2))
)
}
}
if (surro.stats) {
mtext(
Expand Down

0 comments on commit c87265e

Please sign in to comment.