censored.mean: A hybrid mean/median function for left censored variables

View source: R/censored.mean.R

censored.meanR Documentation

A hybrid mean/median function for left censored variables

Description

Returns the median if the majority of values are censored and the mean otherwise.

Usage

censored.mean(x, lower, trim=0)

Arguments

x

numeric vector.

lower

left censoring point.

trim

fraction of observations to be trimmed from each end of x before the mean is computed.

See Also

qrnn.fit, qrnn.predict

Examples

x <- c(0, 0, 1, 2, 3)
print(censored.mean(x, lower=0))
x.cens <- c(0, 0, 0, 1, 2)
print(censored.mean(x.cens, lower=0))

qrnn documentation built on April 27, 2023, 9:07 a.m.