NPBayes {NPBayes}R Documentation

Nonparametric Bayes estimate of CDF from arbitrary censored data

Description

This function will compute the nonparametric Bayes estimator of survival/distribution function from censored data with square error loss. The prior is a Dirichlet process.

The data can be uncensored, right censored, left censored or interval censored, but must be nonnegative. We assume F(0)=0.

A left censored observation, t, is handled as an interval censored one with lefts = 0; rights = t.

Usage

NPBayes(B, theta, u, uncen=numeric(0), rightcen=numeric(0),
          lefts=numeric(0), rights=numeric(0))

Arguments

B a positive number. The parameter for the Dirichlet process prior. The weight of prior information. If B is very small, then the resulting prior is "non-informative".
theta a positive number. Another parameter for Dirichlet process prior. The measure/parameter is α [t, infty ) = B exp( - theta t) .
u a non-negative number, where the Bayes estimator 1- hat F(u) is to be computed.
uncen optional vector holding the uncensored observations.
rightcen optional vector holding the right censored observations.
lefts optional vectors holding the left end-points of interval censored observations.
rights optional vectors holding the right end-points of interval censored observations. Their length must agree.

Details

If uncen, rightcen, lefts and rights are all missing, the estimator will be just the prior, 1-hat F(u) = exp(-theta u) .

The observations must all be non-negative.

Due to rounding error and loss of significant digits in subtraction, the result can be untrustworthy when there are many interval censored data.

Value

a single value that is the nonparametric Bayes estimator 1- hat F(u) .

Author(s)

Mai Zhou.

References

Susarla and Van Ryzin (1976) Nonparametric Bayesian estimation of survival curves from incomplete observations. J. Amer. Statist. Assoc. 71, 897-902.

Zhou, M. (2000). Nonparametric Bayes estimator of survival functions for doubly/interval censored data. Tech Report, Univ. of Kentucky.

See also Zhou, M. (2004). Statistica Sinica.

Examples

uncensored <- c(1,5,9)
rightcensored <- c(4,7)
NPBayes(B=12, theta=0.2, u=3.2, uncen=uncensored, rightcen=rightcensored)

leftpt <- 0
rightpt <- 3
NPBayes(B=12, theta=0.2, u=3.2, uncen=uncensored, rightcen=rightcensored, 
lefts = leftpt, rights = rightpt)

[Package NPBayes version 0.6-1 Index]