# Type I censoring: Exponential distribution with rate = 1, censored at time 2
rcens(n = 10, dist = "exp", type = "I", cens.time = 2, rate = 1)
# Type II censoring: Normal distribution, smallest 5 values
rcens(n = 10, r = 5, dist = "norm", type = "II", mean = 0, sd = 1)
Run the code above in your browser using DataLab