cenTS: Create a censored time series object of 'cenTS' class

Description

Create a censored time series response object of cenTS class. Default name of the response is "value",
with the vectors of lower/upper censoring limits denoted by lcl and ucl respectively.
The vector of censoring indicators, i.e., ci, is part of the cenTS object.
Additional related variables can be stored and provided in the construction function, whose names
are stored in xreg. All variable values are assumed to be of the same length of and thus
aligned with the censored response time series. cenTS inherits from xts::xts.

Usage

1
2

Arguments

value

the value vector.

order.by

the index vector, must be a vector of time/date.

lcl

the vector of lower censoring limits, or a single numeric representing the constant limit.
Default = NULL indicating no lower limit.

ucl

the vector of upper censoring limits, or a single numeric representing the constant limit.
Default = NULL indicating no upper limit.

ci

the vector of censoring indicators whose value is -1 (0, 1)
if the corresponding response is left censored (observed, right censored).
Default = NULL, in which case, the function will compute ci by value, lcl
and ucl. If ci is not NULL, the function will check the consistency of the data,
assuming the observed values less (greater) than or equal to left (right) censoring limits are censored,
and are observed otherwise. The function will stop if inconsistent results are found.

value.name

the name of the value, default = "value".

...

additional variables, must be able to be coerced to a data.frame.

Value

a cenTS object, any censored observation will be replaced by its corresponding censoring limit.