| NewLemma1 {NPBayes} | R Documentation |
This function will compute the expectation of P[u, infty) prod P[x_i , infty)/P[y_i, infty) , assuming the distribution function is distributed as a Dirichlet process prior. (assume x_i are all right censored.)
Similar to Lemma1 except the term involve y_i .
The data must be nonnegative. We assume F(0)=0.
NewLemma1(B, theta, u=numeric(0), y, x, d)
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 the Dirichlet process prior, how quickly the probability decrease. The measure/parameter is α [t, infty ) = B exp( - theta t) . |
u |
optional. a non-negative number, where the expectation of 1- hat F(u) time [1-F(x)]/[1-F(y)] is to be computed. |
y |
vector holding the truncation times. |
x |
vector holding the right censored observations. |
d |
vectors holding the censoring indicators for x. |
The parameter of the Dirichlet prior is a measure α: we took it to be α [t, infty) = B exp(- theta t).
If there are uncensored observations x, status=1, then the theoretical expectation will include terms like α { x} . Since this is zero for our choice of the α, we exclude those factor in the output.
The observations must all be non-negative.
The Bayes estimator is formed with the ratio of two such expectations, both of them include the term like α { x} .
a single value that is the conditional expectation. If u is present then it includes a term 1- hat F(u) . If there is uncensored data, then the product it return will exclude the factor α {a_i} , which is zero under continuous measure. This do not matter when all we need is the ratio of two such terms. They will be canceled in a ratio expression anyway. (this is the case for the Bayes estimator).
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. (2000). Nonparametric Bayes estimator of survival functions for doubly/interval censored data. Tech Report, Univ. of Kentucky.
See also Zhou, M. (2004). Statistica Sinica.
Zhou and Luan (2004). Tech Report, Univ. Kentucky
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)