# NOT RUN {
#load data
data(fakeData)
#exponential decay type weight
expWt <- calWt(rl=-Inf,ru=Inf,p=fakeData$p,y=fakeData$y,r=0.2,
lambda=0.05,delta=0.2,returnSmoothedEvent = TRUE)
plot(expWt$o,expWt$wt,xlab="Smoothed Observed Event Rate",
ylab="Calibration Weight",ylim=c(0,1))
#indicator type weight
indWt <- calWt(rl=0.1,ru=0.3,p=fakeData$p,y=fakeData$y,r=0.2,
lambda=0.05,delta=0.2,returnSmoothedEvent = TRUE)
plot(indWt$o,indWt$wt,xlab="Smoothed Observed Event Rate",
ylab="Calibration Weight",ylim=c(0,1))
# }
Run the code above in your browser using DataLab