NPBayesT2 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 _l_e_f_t _t_r_u_n_c_a_t_e_d, _r_i_g_h_t _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 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. _U_s_a_g_e: NPBayesT2(B, theta, u, y = numeric(0), x = numeric(0), status = numeric(0)) _A_r_g_u_m_e_n_t_s: 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 alpha [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. _D_e_t_a_i_l_s: 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. _V_a_l_u_e: a single value that is the Bayes nonparametric 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. 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. _E_x_a_m_p_l_e_s: 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)