cohort <- data.frame(
x1 = runif(100),
x2 = runif(100)
)
cohort$event <- rbinom(n=nrow(cohort),size=1,
prob=0.25+0.1*cohort$x1+.1*cohort$x2)
fit <- blm(event~x1+x2, data=cohort)
C <- displacement(fit)
# INDEX PLOT
plot(C)
Run the code above in your browser using DataLab