| Lemma1 {NPBayes} | R Documentation |
This function will compute the expectation of prod P[a_i, infty) with respect to the Dirichlet process prior.
This is the expectation described in Lemma 1 of Zhou (2001), or Zhou (2004).
Lemma1(B, theta, ai, zi = numeric(0))
B |
a positive number. The parameter for Dirichlet process prior, the weight of prior information. If B is very small, then the resulting Dirichlet process prior is ``non-informative". |
theta |
a positive number. Another parameter for Dirichlet process prior. The measure/parameter is α [t, infty ) = B exp( - theta t) . |
ai |
vector holding the right censored observations. |
zi |
optional vector holding the uncensored observations. |
The Dirichlet process prior has a parameter α, which is a measure on the positive line. We took this measure α as α [t, infty) = B exp ( theta t ) + sum I[t <=q z_i <=q infty).
The observations must all be non-negative.
a single value that is the expectation.
Mai Zhou.
Susarla and Van Ryzin (1976) Nonparametric Bayesian estimation of survival curves from incomplete observations. J. Amer. Statist. Assoc. 71, 897-902.
Zhou, M. (2001). Nonparametric Bayes estimator of survival functions for doubly/interval censored data. Tech Report, Univ. of Kentucky.
See also Zhou, M. (2004). Statistica Sinica.
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)