View source: R/censorContVar.r
censorContVar | R Documentation |
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.
censorContVar(x, LLOD = NA, ULOD = NA)
x |
Vector of random numbers. |
LLOD |
Lower limit where |
ULOD |
Upper limit where |
A data.frame
as specified by code = interval2
in Surv
.
Stanislas Hubeaux, stan.hubeaux@bluewin.ch
Kaspar Rufibach, kaspar.rufibach@gmail.com
http://www.kasparrufibach.ch
## random vector
x <- rnorm(200)
## interval-censor this vector at -1 and 0.5
censorContVar(x, -1, 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.