pava.pred: Make predictions of predict functions in rows mononotone

Description Usage Arguments Value Author(s) Examples

View source: R/predict-timereg.r

Description

Make predictions of predict functions in rows mononotone using the pool-adjacent-violators-algorithm

Usage

1
pava.pred(pred, increasing = TRUE)

Arguments

pred

predictions, either vector or rows of predictions.

increasing

increasing or decreasing.

Value

mononotone predictions.

Author(s)

Thomas Scheike

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(bmt); 

## competing risks 
add<-comp.risk(Event(time,cause)~platelet+age+tcell,data=bmt,cause=1)
ndata<-data.frame(platelet=c(1,0,0),age=c(0,1,0),tcell=c(0,0,1))
out<-predict(add,newdata=ndata,uniform=0)

par(mfrow=c(1,1))
head(out$P1)
matplot(out$time,t(out$P1),type="s")

###P1m <- t(apply(out$P1,1,pava))
P1monotone <- pava.pred(out$P1)
head(P1monotone)
matlines(out$time,t(P1monotone),type="s")

timereg documentation built on Oct. 13, 2021, 5:06 p.m.

Related to pava.pred in timereg...