DDPGPSurv-package: DDP-GP Survival Analysis Package

Description Details Author(s) Examples

Description

A nonparametric Bayesian approach to survival analysis. The functions perform inference via MCMC simulations from the posterior distributions for a Dependent Dirichlet Process-Gaussian Process prior. To maximize computational efficiency, some of the computations are performed in 'Rcpp'.

Details

The Dependent Dirichlet Process-Gaussian Process model is summarized below. The Dependent Dirichlet Process has a Gaussian Process as its base measure.

y_i|μ_h(x_i),σ^2=∑_{h=1}^{∞}w_{h}N(μ_{h}(x_i),σ^2)

μ_h(x)\sim GP(xβ_h,C(\cdot,\cdot))

C(x_{i},x_{j})=σ_0^2exp\{-\Vert \frac{x_{i}-x_{j}}{l^2}\Vert^{2}\}+I_{\{i=j\}}J^{2}

Here, the mean of the Gaussian Process is modeled using linear regression with regression coefficients β_h and J is a small diagonal perturbation to the squared exponential covariance function (set to 0.01).

To complete the model specification, independent hyperpriors are assumed:

β_{h}\sim N(β_{0},Σ_{0})

σ^{-2}\sim Gamma(δ_{1},δ_{2})

We use a hyperparamter M to control the weights (w_{h}) in the model:

M\sim Gamma(λ_{1},λ_{2})

Author(s)

William Hua <[email protected]>, Yanxun Xu <[email protected]>

Maintainer: William Hua <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
########################################
#Source dependent packages
library(MASS)
library(mc2d)
library(mvnfast)
library(survival)
#Simulate Data using built-in data generation
##
seed=1
set.seed(seed)
Npat=5
data <- simulate_data(Npat)

########################################
#Run MCMC 
########################################
#Inputs for mcmc 
response <- log(data$OS)
covariate <- cbind(scale(data$Age),data$AUC,data$CR)
censor_status <- data$death
mcmc_settings<-NULL
mcmc_settings$nskip<-10
mcmc_settings$nburn<-50
mcmc_settings$ndisplay<-100
mcmc_settings$nsave<-20
mcmc_settings$sigma_jump<-c(0,4,2.5,4,2.6)
###################
#Run MCMC function
mcmc_Gibbs<-mcmc_DDPGP(response,covariate,censor_status,mcmc_settings)

########################################
#Plotting Density/Survival/Hazard Estimation 
########################################
#Parameters in Plotting Estimation for Functions 
range=seq(2,8,1)
example_AUC <- 5
example_CR <- 1
example_Age <- 0
new_pat<-cbind(example_Age,example_AUC,example_CR)
if_plot=1
###################
#Plot DDP-GP Density Esimation
a=DDPGP_Dens(mcmc_Gibbs,new_pat,range, if_plot)

#Plot DDP-GP Survival Esimation
b=DDPGP_Surv(mcmc_Gibbs,new_pat,range, if_plot)

#Plot DDP-GP Hazard Esimation
c=DDPGP_Haz(mcmc_Gibbs,new_pat,range, if_plot)
########################################
#Plotting Mean Survival Estimation 
########################################
#Parameters in Plotting Mean Survival Estimation 
range_AUC <- seq(2.6, 7, 0.1)
new_pat_1<-cbind(example_Age,range_AUC,example_CR)
if_plot=1
DDPGP_mean<-DDPGP_meansurvival(mcmc_Gibbs,new_pat_1,if_plot,cov_col=2)

DDPGPSurv documentation built on June 24, 2018, 5:06 p.m.