I have data from a retrospective survey. The individuals who have not experienced a particular event of interest upto survey time are put into censored observation category and rest are uncensored. How to draw boxplot for this right censored data that shows the life table quartiles taking into account both censored and un-censored observations?
(My variable of interest 'fbi' is a duration variable, thus for uncensored obs durations are available and for censored I have replaced the duration 'fbi' with time interval between the origin to survey date and another dichotomous variable "cens" is there to recognize censored and uncensored cases.)
The data can be emulated with:
fbi <- rpois(100,12)
cens <- sample(0:1,100,replace=T)
test <- data.frame(fbi,cens)
> head(test)
fbi cens
1 18 0
2 14 0
3 17 1
4 11 1
5 9 0
6 10 1