NPBayesT2 {NPBayes}R Documentation

Nonparametric Bayes estimate of CDF from left truncated, right censored data

Description

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

The data must be nonnegative. We assume F(0)=0.

Usage

NPBayesT2(B, theta, u, y = numeric(0), x = numeric(0), status = numeric(0))

Arguments

B a positive number. The parameter for 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 estimator of 1- hat F(u) is to be computed.
y optional vector holding the (non-negative) truncation times.
x optional vector holding the (possibly) right censored observations.
status optional vector holding the censoring status of the x vector. 1–uncensor, 0–censor.

Details

The observations must all be non-negative. Due to left truncation, data must also satisfy y_i < x_i. The 3 data vectors, x, y, status must be of the same length. This function is standalone.

Value

a single value that is the Bayes nonparametric 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.

Luan, J, and Zhou, M. (2004). Nonparametric Bayes estimator of survival functions for censored data that are also subject to left truncation. Tech Report. Univ. Kentucky.

Examples

trunc <- c(2,4,10)
xtime <- c(9,13,15)
d <- c(1,0,0) 
NPBayesT(B=8, theta=0.12, u=3.2, y=trunc, x=xtime, status=d)

ui <- seq(0.1, 20, 0.1)
fui <- ui
for(i in 1:200) 
   fui[i] <- NPBayesT(B=8, theta=0.12, u=ui[i],y=trunc, x=xtime, status=d)
#plot(ui, fui)

ypsy <- c(51, 58, 55, 28, 25, 48, 47, 25, 31, 30, 33, 43, 45, 35, 36)
xpsy <- c(52, 59, 57, 50, 57, 59, 61, 61, 62, 67, 68, 69, 69, 65, 76)
dpsy <- c(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1 ) 
NPBayesT(B=8,theta=0.02,u=56,y=ypsy,x=xpsy,status=dpsy)

[Package NPBayes version 0.6-1 Index]