R {mlt} | R Documentation |
Represent a possibly censored or truncated response variable
R(object, ...) ## S3 method for class 'numeric' R(object = NA, cleft = NA, cright = NA, tleft = NA, tright = NA, tol = sqrt(.Machine$double.eps), ...) ## S3 method for class 'ordered' R(object, cleft = NA, cright = NA, ...) ## S3 method for class 'integer' R(object, cleft = NA, cright = NA, bounds = c(min(object), Inf), ...) ## S3 method for class 'factor' R(object, ...) ## S3 method for class 'Surv' R(object, ...) as.Surv(object) ## S3 method for class 'response' as.Surv(object)
object |
A vector of (conceptually) exact measurements or an object of class
|
cleft |
A vector of left borders of censored measurements |
cright |
A vector of right borders of censored measurements |
tleft |
A vector of left truncations |
tright |
A vector of right truncations |
tol |
Tolerance for checking if |
bounds |
Range of possible values for integers |
... |
other arguments, ignored except for |
R
is basically an extention of Surv
for the
representation of arbitrarily censored or truncated measurements at any scale.
R
applied to a list calls R
for each of the list elements
and returns a joint object.
### ordered factor R(gl(3, 3, labels = LETTERS[1:3]))