Combines two variables a, b into a 2-column matrix, preserving label and units attributes and converting character or factor variables into integers and added a levels attribute. This is used to combine censoring points with regular points. If both variables are already factors, their levels are distinctly combined starting with the levels for a. Character variables are converted to factors.

Ocens(a, b = a)

Arguments

a

variable for first column

b

variable for second column

Value

a numeric matrix of class Ocens

Details

Left censored values will have -Inf for a and right-censored values will have Inf for b. Interval-censored observations will have b > a and both finite. For factor or character variables it only makes sense to have interval censoring.

If there is no censoring, a is returned as an ordinary vector, with label and units attributes.

Author

Frank Harrell