censorContVar {SurvRegCensCov} | R Documentation |
Censor a vector of continuous numbers
Description
Given a vector of realizations of a continuous random variable, interval-, left-, or right-censor these numbers at given boundaries. Useful when setting up simulations involving censored observations.
Usage
censorContVar(x, LLOD = NA, ULOD = NA)
Arguments
x |
Vector of random numbers. |
LLOD |
Lower limit where |
ULOD |
Upper limit where |
Value
A data.frame
as specified by code = interval2
in Surv
.
Author(s)
Stanislas Hubeaux, stan.hubeaux@bluewin.ch
Kaspar Rufibach, kaspar.rufibach@gmail.com
http://www.kasparrufibach.ch
Examples
## random vector
x <- rnorm(200)
## interval-censor this vector at -1 and 0.5
censorContVar(x, -1, 0.5)
[Package SurvRegCensCov version 1.7 Index]