NPBayes package:NPBayes R Documentation _N_o_n_p_a_r_a_m_e_t_r_i_c _B_a_y_e_s _e_s_t_i_m_a_t_e _o_f _C_D_F _f_r_o_m _a_r_b_i_t_r_a_r_y _c_e_n_s_o_r_e_d _d_a_t_a _D_e_s_c_r_i_p_t_i_o_n: 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. _U_s_a_g_e: NPBayes(B, theta, u, uncen=numeric(0), rightcen=numeric(0), lefts=numeric(0), rights=numeric(0)) _A_r_g_u_m_e_n_t_s: 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 alpha [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. _D_e_t_a_i_l_s: 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. _V_a_l_u_e: a single value that is the nonparametric Bayes estimator 1- hat F(u) . _A_u_t_h_o_r(_s): Mai Zhou. _R_e_f_e_r_e_n_c_e_s: 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. _E_x_a_m_p_l_e_s: 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)