Ocens: Censored Ordinal Variable

Description Usage Arguments Value Author(s)


Creates a 2-column integer matrix that handles left- right- and interval-censored ordinal or continuous values for use in blrm(). A pair of values [a, b] represents an interval-censored value known to be in the interval [a, b] inclusive of a and b. It is assumed that all distinct values are observed as uncensored for at least one observation. When both input variables are factors it is assume that the one with the higher number of levels is the one that correctly specifies the order of levels, and that the other variable does not contain any additional levels. If the variables are not factors it is assumed their original values provide the orderings. Since all values that form the left or right endpoints of an interval censored value must be represented in the data, a left-censored point is is coded as a=1 and a right-censored point is coded as b equal to the maximum observed value. If the maximum observed value is not really the maximum possible value, everything still works except that predictions involving values above the highest observed value cannot be made. As with most censored-data methods, blrm() assumes that censoring is independent of the response variable values that would have been measured had censoring not occurred.


Ocens(a, b = a)



vector representing a factor, numeric, or alphabetically ordered character strings


like a. If omitted, it copies a, representing nothing but uncensored values


a 2-column integer matrix of class "Ocens" with an attribute levels (ordered). When the original variables were factors, these are factor levels, otherwise are numerically or alphabetically sorted distinct (over a and b combined) values. When the variables are not factors and are numeric, another attribute median is also returned. This is the median of the uncensored values. When the variables are factor or character, the median of the integer versions of variables for uncensored observations is returned as attribute mid. A final attribute freq is the vector of frequencies of occurrences of all uncensored values. freq aligns with levels.


Frank Harrell

rmsb documentation built on Feb. 28, 2021, 1:06 a.m.