Title: | Bayesian Models for Partly Interval-Censored Data |
---|---|
Description: | Contains functions to fit proportional hazards (PH) model to partly interval-censored (PIC) data (Pan et al. (2020) <doi:10.1177/0962280220921552>), PH model with spatial frailty to spatially dependent PIC data (Pan and Cai (2021) <doi:10.1080/03610918.2020.1839497>), and mixed effects PH model to clustered PIC data. Each random intercept/random effect can follow both a normal prior and a Dirichlet process mixture prior. It also includes the corresponding functions for general interval-censored data. |
Authors: | Chun Pan |
Maintainer: | Chun Pan <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-12-16 06:53:55 UTC |
Source: | CRAN |
Contains functions to fit proportional hazards (PH) model to partly interval-censored (PIC) data (Pan et al. (2020) <doi:10.1177/0962280220921552>), PH model with spatial frailty to spatially dependent PIC data (Pan and Cai (2021) <doi:10.1080/03610918.2020.1839497>), and mixed effects PH model to clustered PIC data. Each random intercept/random effect can follow both a normal prior and a Dirichlet process mixture prior. It also includes the corresponding functions for general interval-censored data.
Package: | PICBayes |
Type: | Package |
Version: | 1.0 |
Date: | 2021-08-04 |
License: | GPL>=2 |
LazyLoad: | yes |
Chun Pan
Maintainer: Chun Pan [email protected]
The adjacency matrix of the 46 South Carolina counties. C[i,j] = 1 if county i and county j share boundaries; 0 if not. C[i,i] = 0.
data(C)
data(C)
Fit a Bayesian semiparametric PH model with random intercept for
clustered general interval-censored data.
Random intercept follows a normal distribution N(0, tau^{-1})
.
clusterIC_int(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_int(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor and random intercept phi_i
are sampled using MH algorithm.
During the initial beta_iter
iterations, sd of the proposal distribution is beta_cand
.
Afterwards, proposal sd is set to be the sd of available MCMC draws.
Same method for phi_i
.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
partau |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric PH model with random intercept for clustered general interval-censored data. Random intercept follows a Dirithlet process mixture distribution.
clusterIC_int_DP(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_int_DP(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
DP mixture prior:
phi_i~N(0,tau_{i}^{-1})
tau_{i}~G
G~DP(alpha,G_{0})
G_{0}=Gamma(a_tau_star,b_tau_star)
tau_{h}^{*}~G_{0}, h=1,...,H
The blocked Gibbs sampler proposed by Ishwaran and James (2001) is used to sample from the posteriors under the DP mixture prior.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
parphi |
A |
partau_star |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric PH model with random intercept
and random treatment for clustered general interval-censored data.
Each random effect follows a normal distribution N(0, tau^{-1})
.
clusterIC_trt(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, a_tau_trt, b_tau_trt, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_trt(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, a_tau_trt, b_tau_trt, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
xtrt |
The covariate that has a random effect. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
a_tau_trt |
The shape parameter of Gamma prior for random treatment precision |
b_tau_trt |
The rate parameter of Gamma prior for random treatment precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor, random intercept phi_i
,
and random treatment phi_trt_i
are sampled using MH algorithm.
During the initial beta_iter
iterations, sd of the proposal distribution is beta_cand
.
Afterwards, proposal sd is set to be the sd of available MCMC draws.
Same method for phi_i
and phi_trt_i
.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
parphi_trt |
A |
partau |
A |
partau_trt |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric PH model with random intercept and random treatment for clustered general interval-censored data. Each random effect follows a Dirichlet process mixture distribution.
clusterIC_trt_DP(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, a_alpha_trt, b_alpha_trt, H_trt, a_tau_trt_star, b_tau_trt_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_trt_DP(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, a_alpha_trt, b_alpha_trt, H_trt, a_tau_trt_star, b_tau_trt_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
xtrt |
The covariate that has a random effect. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
a_alpha_trt |
The shape parameter of Gamma prior for |
b_alpha_trt |
The rate parameter of Gamma prior for |
H_trt |
The number of distinct components in DP mixture prior under blocked Gibbs sampler for random treatment. |
a_tau_trt_star |
The shape parameter of |
b_tau_trt_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
Both random intercept and random treatment follow its own DP mixture prior. DP mixture prior:
phi_i~N(0,tau_{i}^{-1})
tau_{i}~G
G~DP(alpha,G_{0})
G_{0}=Gamma(a_tau_star,b_tau_star)
tau_{h}^{*}~G_{0}, h=1,...,H
The blocked Gibbs sampler proposed by Ishwaran and James (2001) is used to sample from the posteriors under the DP mixture prior.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
paralpha_trt |
A |
parphi |
A |
parphi_trt |
A |
partau_star |
A |
partau_trt_star |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric mixed effects PH model for clustered
general interval-censored data. Each random effect follows a normal distribution N(0, tau^{-1})
.
clusterIC_Z(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_Z(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored; 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
zcov |
The design matrix for the q random effects. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The mixed effects PH model is:
h(t_{ij}|x_{ij},z_{ij})=h_{0}(t_{ij})exp(beta'x_{ij}+phi_{i}'z_{ij})
,
for the jth subject in the ith cluster.
Each of the q random effects is sampled using MH algorithm separately.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric mixed effects PH model for clustered general interval-censored data. Each random effect follows a DP mixture distribution.
clusterIC_Z_DP(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterIC_Z_DP(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
zcov |
The design matrix for the q random effects. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The mixed effects PH model is:
h(t_{ij}|x_{ij},z_{ij})=h_{0}(t_{ij})exp(beta'x_{ij}+phi_{i}'z_{ij})
,
for the jth subject in the ith cluster.
Each of the q random effects is sampled using MH algorithm separately.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Fit a Bayesian semiparametric PH model with random intercept for
clustered partly interval-censored data.
Random intercept follows a normal distribution N(0, tau^{-1})
.
clusterPIC_int(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_int(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
The baseline hazard is approximated by a linear combination of basis M-splines:
sum_{l=1}^{K}(gamma_l*M_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor and random intercept phi_i
are sampled using MH algorithm.
During the initial beta_iter
iterations, sd of the proposal distribution is beta_cand
.
Afterwards, proposal sd is set to be the sd of available MCMC draws.
Same method for phi_i
.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
partau |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da3) try3<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da3), model='clusterPIC_int',area=da3[,6],IC=da3[,7],scale.designX=TRUE,scale=c(1,0), binary=c(0,1),I=25,C=C,nn=nn,order=3,knots=c(0,2,6,max(da3[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1, beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da3) try3<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da3), model='clusterPIC_int',area=da3[,6],IC=da3[,7],scale.designX=TRUE,scale=c(1,0), binary=c(0,1),I=25,C=C,nn=nn,order=3,knots=c(0,2,6,max(da3[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1, beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
Fit a Bayesian semiparametric PH model with random intercept for clustered partly interval-censored data. Random intercept follows a Dirithlet process mixture distribution.
clusterPIC_int_DP(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_int_DP(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
DP mixture prior:
phi_i~N(0,tau_{i}^{-1})
tau_{i}~G
G~DP(alpha,G_{0})
G_{0}=Gamma(a_tau_star,b_tau_star)
tau_{h}^{*}~G_{0}, h=1,...,H
The blocked Gibbs sampler proposed by Ishwaran and James (2001) is used to sample from the posteriors under the DP mixture prior.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
parphi |
A |
partau_star |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da3) try4<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da3), model='clusterPIC_int_DP',area=da3[,6],IC=da3[,7],scale.designX=TRUE, scale=c(1,0),binary=c(0,1),I=25,C=C,order=3, knots=c(0,2,6,max(da3[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_alpha=1,b_alpha=1,H=5,a_tau_star=1, b_tau_star=1,beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1, beta_sig0=10,x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da3) try4<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da3), model='clusterPIC_int_DP',area=da3[,6],IC=da3[,7],scale.designX=TRUE, scale=c(1,0),binary=c(0,1),I=25,C=C,order=3, knots=c(0,2,6,max(da3[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_alpha=1,b_alpha=1,H=5,a_tau_star=1, b_tau_star=1,beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1, beta_sig0=10,x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
Fit a Bayesian semiparametric PH model with random intercept
and random treatment for clustered partly interval-censored data.
Each random effect follows a normal distribution N(0, tau^{-1})
.
clusterPIC_trt(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, a_tau_trt, b_tau_trt, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_trt(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, a_tau_trt, b_tau_trt, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
xtrt |
The covariate that has a random effect. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
a_tau_trt |
The shape parameter of Gamma prior for random treatment precision |
b_tau_trt |
The rate parameter of Gamma prior for random treatment precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
The baseline hazard is approximated by a linear combination of basis M-splines:
sum_{l=1}^{K}(gamma_l*M_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor, random intercept phi_i
,
and random treatment phi_trt_i
are sampled using MH algorithm.
During the initial beta_iter
iterations, sd of the proposal distribution is beta_cand
.
Afterwards, proposal sd is set to be the sd of available MCMC draws.
Same method for phi_i
and phi_trt_i
.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
parphi_trt |
A |
partau |
A |
partau_trt |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da4) try5<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_trt',xtrt=da4[,5],area=da4[,6],IC=da4[,7], scale.designX=TRUE,scaled=c(1,0),binary=c(0,1),I=25,order=3, knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1,a_tau_trt=1,b_tau_trt=1, beta_iter=11,phi_iter=11,beta_cand=c(1,1),phi_cand=1, beta_sig0=10,x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da4) try5<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_trt',xtrt=da4[,5],area=da4[,6],IC=da4[,7], scale.designX=TRUE,scaled=c(1,0),binary=c(0,1),I=25,order=3, knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1,a_tau_trt=1,b_tau_trt=1, beta_iter=11,phi_iter=11,beta_cand=c(1,1),phi_cand=1, beta_sig0=10,x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
Fit a Bayesian semiparametric PH model with random intercept
and random treatment for clustered partly interval-censored data.
Each random effect follows a Dirichlet process mixture distribution N(0, tau^{-1})
.
clusterPIC_trt_DP(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, a_alpha_trt, b_alpha_trt, H_trt, a_tau_trt_star, b_tau_trt_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_trt_DP(L, R, y, xcov, IC, scale.designX, scaled, xtrt, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, a_alpha_trt, b_alpha_trt, H_trt, a_tau_trt_star, b_tau_trt_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
xtrt |
The covariate that has a random effect. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
a_alpha_trt |
The shape parameter of Gamma prior for |
b_alpha_trt |
The rate parameter of Gamma prior for |
H_trt |
The number of distinct components in DP mixture prior under blocked Gibbs sampler for random treatment. |
a_tau_trt_star |
The shape parameter of |
b_tau_trt_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
Both random intercept and random treatment follow its own DP mixture prior. DP mixture prior:
phi_i~N(0,tau_{i}^{-1})
tau_{i}~G
G~DP(alpha,G_{0})
G_{0}=Gamma(a_tau_star,b_tau_star)
tau_{h}^{*}~G_{0}, h=1,...,H
The blocked Gibbs sampler proposed by Ishwaran and James (2001) is used to sample from the posteriors under the DP mixture prior.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
paralpha_trt |
A |
parphi |
A |
parphi_trt |
A |
partau_star |
A |
partau_trt_star |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da4) try2<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_trt_DP', scale.designX=TRUE,scaled=c(1,0),IC=da4[,7],xtrt=da4[,5], area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1, a_alpha=1,b_alpha=1,H=5,a_alpha_trt=1,b_alpha_trt=1,H_trt=5, a_tau_star=1,b_tau_star=1,a_tau_trt_star=1,b_tau_trt_star=1, beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da4) try2<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_trt_DP', scale.designX=TRUE,scaled=c(1,0),IC=da4[,7],xtrt=da4[,5], area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1, a_alpha=1,b_alpha=1,H=5,a_alpha_trt=1,b_alpha_trt=1,H_trt=5, a_tau_star=1,b_tau_star=1,a_tau_trt_star=1,b_tau_trt_star=1, beta_iter=11,phi_iter=11,beta_cand=rep(1,2),phi_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
Fit a Bayesian semiparametric mixed effects PH model for clustered partly
interval-censored data with random effects for one or more predictors.
Each random effect follows a normal distribution N(0, tau^{-1})
.
clusterPIC_Z(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_Z(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_tau, b_tau, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
zcov |
The design matrix for the q random effects. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The mixed effects PH model is:
h(t_{ij}|x_{ij},z_{i})=h_{0}(t_{ij})exp(beta'x_{ij}+phi_{i}'z_{i})
,
for the jth subject in the ith cluster.
Each of the q random effects is sampled using MH algorithm separately.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da4) J=rep(1,nrow(da4)) zcov=cbind(J,da4[,4]) # The 4th column of da4 is x1. try7<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_Z',IC=da4[,7],scale.designX=TRUE,scaled=c(1,0),zcov=zcov, area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1, beta_iter=11,phi_iter=11,beta_cand=c(1,1),phi_cand=1,beta_sig0=10, x_user=NULL,total=30,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da4) J=rep(1,nrow(da4)) zcov=cbind(J,da4[,4]) # The 4th column of da4 is x1. try7<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_Z',IC=da4[,7],scale.designX=TRUE,scaled=c(1,0),zcov=zcov, area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_tau=1,b_tau=1, beta_iter=11,phi_iter=11,beta_cand=c(1,1),phi_cand=1,beta_sig0=10, x_user=NULL,total=30,burnin=10,thin=1,conf.int=0.95,seed=1)
Fit a Bayesian semiparametric mixed effects PH model for clustered partly interval-censored data with random effects for one or more predictors. Each random effect follows a DP mixture distribution.
clusterPIC_Z_DP(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
clusterPIC_Z_DP(L, R, y, xcov, IC, scale.designX, scaled, zcov, area, binary, I, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_alpha, b_alpha, H, a_tau_star, b_tau_star, beta_iter, phi_iter, beta_cand, phi_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
zcov |
The design matrix for the q random effects. |
area |
The vector of cluster ID. |
binary |
The vector indicating whether each covariate is binary. |
I |
The number of clusters. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The mixed effects PH model is:
h(t_{ij}|x_{ij},z_{i})=h_{0}(t_{ij})exp(beta'x_{ij}+phi_{i}'z_{i})
,
for the jth subject in the ith cluster.
Each of the q random effects is sampled using MH algorithm separately.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
paralpha |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival function is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
# Number of iterations set to very small for CRAN automatic testing data(da4) J=rep(1,nrow(da4)) zcov=cbind(J,da4[,4]) try8<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_Z_DP',IC=da4[,7],scale.designX=TRUE,scaled=c(1,0),zcov=zcov, area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_alpha=1,b_alpha=1,H=5, a_tau_star=1,b_tau_star=1,beta_iter=11,phi_iter=11,beta_cand=1,phi_cand=1, beta_sig0=10,x_user=NULL,total=20,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da4) J=rep(1,nrow(da4)) zcov=cbind(J,da4[,4]) try8<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da4), model='clusterPIC_Z_DP',IC=da4[,7],scale.designX=TRUE,scaled=c(1,0),zcov=zcov, area=da4[,6],binary=c(0,1),I=25,order=3,knots=c(0,2,6,max(da4[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_alpha=1,b_alpha=1,H=5, a_tau_star=1,b_tau_star=1,beta_iter=11,phi_iter=11,beta_cand=1,phi_cand=1, beta_sig0=10,x_user=NULL,total=20,burnin=10,thin=1,conf.int=0.95,seed=1)
Extracts estimated regression coefficients.
## S3 method for class 'PICBayes' coef(object, ...)
## S3 method for class 'PICBayes' coef(object, ...)
object |
The class PICBayes object. |
... |
Other arguments if any. |
An object of class coef
.
A simulated partly interval-censored data set based on:
lambda(t|x)=lambda_{0}(t)exp(x1+x2)
.
data(da1)
data(da1)
L: | Left endpoints of observed time intervals. |
R: | Right endpoints of observed time intervals. |
y: | Censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
X1: | Covariate 1. |
X2: | Covariate 2. |
IC: | General interval-censored indicator: 1=general interval-censored, 0=exact. |
ID: | Subject ID. |
A simulated clsutered partly interval-censored data set based on PH model with spatial frailty:
lambda(t|x)=lambda_{0}(t)exp(x1+x2+phi)
.
data(da2)
data(da2)
L: | Left endpoints of observed time intervals. |
R: | Right endpoints of observed time intervals. |
y: | Censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
X1: | Covariate 1. |
X2: | Covariate 2. |
area: | Cluster ID. |
IC: | General interval-censored indicator: 1=general interval-censored, 0=exact. |
ID: | Subject ID. |
A simulated clsutered partly interval-censored data set based on PH model with random intercept:
lambda(t|x)=lambda_{0}(t)exp(x1+x2+phi)
.
data(da3)
data(da3)
L: | Left endpoints of observed time intervals. |
R: | Right endpoints of observed time intervals. |
y: | Censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
X1: | Covariate 1. |
X2: | Covariate 2. |
area: | Cluster ID. |
IC: | General interval-censored indicator: 1=general interval-censored, 0=exact. |
ID: | Subject ID. |
A simulated clsutered partly interval-censored data set based on PH model with random intercept and random effect for x2:
lambda(t|x)=lambda_{0}(t)exp(x1+x2+phi+phi_trt*x2)
.
data(da4)
data(da4)
L: | Left endpoints of observed time intervals. |
R: | Right endpoints of observed time intervals. |
y: | Censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
X1: | Covariate 1. |
X2: | Covariate 2. |
area: | Cluster ID. |
IC: | General interval-censored indicator: 1=general interval-censored, 0=exact. |
ID: | Subject ID. |
Fit a Bayesian semiparametric PH model to general interval-censored data.
IC(L, R, y, xcov, IC, scale.designX, scaled, binary, order, knots, grids, a_eta, b_eta, a_ga, b_ga, beta_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
IC(L, R, y, xcov, IC, scale.designX, scaled, binary, order, knots, grids, a_eta, b_eta, a_ga, b_ga, beta_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
binary |
The vector indicating whether each covariate is binary. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor is sampled
using MH algorithm. During the initial beta_iter
iterations, sd of the
proposal distribution is beta_cand
. Afterwards, proposal sd is set to be
the sd of available MCMC draws.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Pan, C., Cai, B., and Wang, L. (2020). A Bayesian approach for analyzing partly interval-censored data under the proportional hazards model. Statistical Methods in Medical Research,
DOI: 10.1177/0962280220921552.
The log-likelihood of the observed partly interval-censored data estimated by log pseudo-marginal likelihood.
## S3 method for class 'PICBayes' logLik(object, ...)
## S3 method for class 'PICBayes' logLik(object, ...)
object |
Class PICBayes object. |
... |
Other arguments if any. |
An object of class logLik
.
A progression-free survival data set derived by the author from a phase 3 metastatic colorectal cancer clinical trial.
data(mCRC)
data(mCRC)
L: | Left endpoints of observed time intervals. |
R: | Right endpoints of observed time intervals. |
y: | Censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
TRT_C: | Treatment arm: 0 = FOLFIRI alone, 1 = Panitumumab + FOLFIRI. |
KRAS_C: | Tumor KRAS mutation status: 0 = wild-type, 1 = mutant. |
SITE: | Clinical site where a patient is treated. |
IC: | General interval-censored indicator: 1=general interval-censored, 0=exact. |
ID: | Subject ID. |
Fit a Bayesian semiparametric PH model to partly interval-censored data.
PIC(L, R, y, xcov, IC, scale.designX, scaled, binary, order, knots, grids, a_eta, b_eta, a_ga, b_ga, beta_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
PIC(L, R, y, xcov, IC, scale.designX, scaled, binary, order, knots, grids, a_eta, b_eta, a_ga, b_ga, beta_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
binary |
The vector indicating whether each covariate is binary: 1=binary, 0=not. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
The baseline hazard is approximated by a linear combination of basis M-splines:
sum_{l=1}^{K}(gamma_l*M_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor is sampled
using MH algorithm. During the initial beta_iter
iterations, sd of the
proposal distribution is beta_cand
. Afterwards, proposal sd is set to be
the sd of available MCMC draws.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Pan, C., Cai, B., and Wang, L. (2020). A Bayesian approach for analyzing partly interval-censored data under the proportional hazards model. Statistical Methods in Medical Research,
DOI: 10.1177/0962280220921552.
# Number of iterations set to very small for CRAN automatic testing data(da1) try1<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da1), model='PIC',IC=da1[,6],scale.designX=TRUE,scale=c(1,0),binary=c(0,1), order=3,knots=c(0,2,6,max(da1[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,beta_iter=11,beta_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
# Number of iterations set to very small for CRAN automatic testing data(da1) try1<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da1), model='PIC',IC=da1[,6],scale.designX=TRUE,scale=c(1,0),binary=c(0,1), order=3,knots=c(0,2,6,max(da1[,1:2],na.rm=TRUE)+1),grids=seq(0.1,10.1,by=0.1), a_eta=1,b_eta=1,a_ga=1,b_ga=1,beta_iter=11,beta_cand=1,beta_sig0=10, x_user=NULL,total=60,burnin=10,thin=1,conf.int=0.95,seed=1)
Calls one of the 16 functions to fit the correspoinding model.
PICBayes(L, ...) ## Default S3 method: PICBayes(L,R,y,xcov,IC,model,scale.designX,scaled,xtrt,zcov, area,binary,I,C,nn,order=3,knots,grids,a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_lamb=1, b_lamb=1,a_tau=1,b_tau=1,a_tau_trt=1,b_tau_trt=1,a_alpha=1,b_alpha=1,H=5, a_tau_star=1,b_tau_star=1,a_alpha_trt=1,b_alpha_trt=1,H_trt=5, a_tau_trt_star=1,b_tau_trt_star=1,beta_iter=1001,phi_iter=1001, beta_cand,phi_cand,beta_sig0=10,x_user=NULL, total=6000,burnin=1000,thin=1,conf.int=0.95,seed=1,...) ## S3 method for class 'formula' PICBayes(formula, data, ...)
PICBayes(L, ...) ## Default S3 method: PICBayes(L,R,y,xcov,IC,model,scale.designX,scaled,xtrt,zcov, area,binary,I,C,nn,order=3,knots,grids,a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_lamb=1, b_lamb=1,a_tau=1,b_tau=1,a_tau_trt=1,b_tau_trt=1,a_alpha=1,b_alpha=1,H=5, a_tau_star=1,b_tau_star=1,a_alpha_trt=1,b_alpha_trt=1,H_trt=5, a_tau_trt_star=1,b_tau_trt_star=1,beta_iter=1001,phi_iter=1001, beta_cand,phi_cand,beta_sig0=10,x_user=NULL, total=6000,burnin=1000,thin=1,conf.int=0.95,seed=1,...) ## S3 method for class 'formula' PICBayes(formula, data, ...)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
model |
A character string specifying the type of model. See details. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
xtrt |
The covariate that has a random effect. |
zcov |
The design matrix for the q random effects. |
area |
The vector of cluster ID. |
I |
The number of areas. |
C |
The adjacency matrix. |
nn |
The vector of number of neighbors for each area. |
binary |
The vector indicating whether each covariate is binary. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_lamb |
The shape parameter of Gamma prior for spatial precision |
b_lamb |
The rate parameter of Gamma prior for spatial precision |
a_tau |
The shape parameter of Gamma prior for random intercept precision |
b_tau |
The rate parameter of Gamma prior for random intercept precision |
a_tau_trt |
The shape parameter of Gamma prior for random treatment precision |
b_tau_trt |
The rate parameter of Gamma prior for random treatment precision |
a_alpha |
The shape parameter of Gamma prior for |
b_alpha |
The rate parameter of Gamma prior for |
H |
The number of distinct components in DP mixture prior under blocked Gibbs sampler. |
a_tau_star |
The shape parameter of |
b_tau_star |
The rate parameter of |
a_alpha_trt |
The shape parameter of Gamma prior for |
b_alpha_trt |
The rate parameter of Gamma prior for |
H_trt |
The number of distinct components in DP mixture prior under blocked Gibbs sampler for random treatment. |
a_tau_trt_star |
The shape parameter of |
b_tau_trt_star |
The rate parameter of |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
phi_cand |
The sd of the proposal normal distribution in the initial MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
formula |
A formula expression with the response returned by the Surv function in the survival package. |
data |
A data frame that contains the variables named in the formula argument. |
... |
Other arguments if any. |
Possible values are "PIC", "spatialPIC", "clusterPIC_int", "clusterPIC_int_DP", "clusterPIC_trt", "clusterPIC_trt_DP", "clusterPIC_Z", and "clusterPIC_Z_DP" for partly interval-censored data; and "IC", "spatialIC", "clusterIC_int", "clusterIC_int_DP", "clusterIC_trt", "clusterIC_trt_DP", "clusterIC_Z", and "clusterIC_Z_DP" for general interval-censored data.
An object of class PICBayes
. Refere to each specific function for its specific values.
Chun Pan
Plot estimated baseline survival function at grids
.
## S3 method for class 'PICBayes' plot(x, y, ...)
## S3 method for class 'PICBayes' plot(x, y, ...)
x |
A sequence of points ( |
y |
Estiamted baseline survival at |
... |
Other arguments if any. |
A plot of baseline survival function.
Fit a Bayesian semiparametric PH model with spatial frailty for spatially dependent general interval-censored data.
spatialIC(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, C, nn, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_lamb, b_lamb, beta_iter, phi_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
spatialIC(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, C, nn, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_lamb, b_lamb, beta_iter, phi_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of area ID. |
I |
The number of areas. |
C |
The adjacency matrix. |
nn |
The vector of number of neighbors for each area. |
binary |
The vector indicating whether each covariate is binary. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_lamb |
The shape parameter of Gamma prior for spatial precision |
b_lamb |
The rate parameter of Gamma prior for spatial precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor is sampled
using MH algorithm. During the initial beta_iter
iterations, sd of the
proposal distribution is beta_cand
. Afterwards, proposal sd is set to be
the sd of available MCMC draws.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
parlamb |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Pan, C. and Cai, B. (2020). A Bayesian model for spatial partly interval-censored data. Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2020.1839497.
Fit a Bayesian semiparametric PH model with spatial frailty for spatially dependent partly interval-censored data.
spatialPIC(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, C, nn, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_lamb, b_lamb, beta_iter, phi_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
spatialPIC(L, R, y, xcov, IC, scale.designX, scaled, area, binary, I, C, nn, order, knots, grids, a_eta, b_eta, a_ga, b_ga, a_lamb, b_lamb, beta_iter, phi_iter, beta_cand, beta_sig0, x_user, total, burnin, thin, conf.int, seed)
L |
The vector of left endpoints of the observed time intervals. |
R |
The vector of right endponts of the observed time intervals. |
y |
The vector of censoring indicator: 0=left-censored, 1=interval-censored, 2=right-censored, 3=exact. |
xcov |
The covariate matrix for the p predictors. |
IC |
The vector of general interval-censored indicator: 1=general interval-censored, 0=exact. |
scale.designX |
The TRUE or FALSE indicator of whether or not to scale the design matrix X. |
scaled |
The vector indicating whether each covariate is to be scaled: 1=to be scaled, 0=not. |
area |
The vector of area ID. |
I |
The number of areas. |
C |
The adjacency matrix. |
nn |
The vector of number of neighbors for each area. |
binary |
The vector indicating whether each covariate is binary. |
order |
The degree of basis I-splines: 1=linear, 2=quadratic, 3=cubic, etc. |
knots |
A sequence of knots to define the basis I-splines. |
grids |
A sequence of points at which baseline survival function is to be estimated. |
a_eta |
The shape parameter of Gamma prior for |
b_eta |
The rate parameter of Gamma prior for |
a_ga |
The shape parameter of Gamma prior for |
b_ga |
The rate parameter of Gamma prior for |
a_lamb |
The shape parameter of Gamma prior for spatial precision |
b_lamb |
The rate parameter of Gamma prior for spatial precision |
beta_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
phi_iter |
The number of initial iterations in the Metropolis-Hastings sampling for |
beta_cand |
The sd of the proposal normal distribution in the MH sampling for |
beta_sig0 |
The sd of the prior normal distribution for |
x_user |
The user-specified covariate vector at which to estimate survival function(s). |
total |
The number of total iterations. |
burnin |
The number of burnin. |
thin |
The frequency of thinning. |
conf.int |
The confidence level of the CI for |
seed |
A user-specified random seed. |
The baseline cumulative hazard is approximated by a linear combination of I-splines:
sum_{l=1}^{K}(gamma_l*b_l(t))
.
The baseline hazard is approximated by a linear combination of basis M-splines:
sum_{l=1}^{K}(gamma_l*M_l(t))
.
For a binary prdictor, we sample e^{beta_r}
, with Gamma prior.
The regression coefficient beta_r
for a continuous predictor is sampled
using MH algorithm. During the initial beta_iter
iterations, sd of the
proposal distribution is beta_cand
. Afterwards, proposal sd is set to be
the sd of available MCMC draws.
a list containing the following elements:
N |
The sample size. |
parbeta |
A |
parsurv0 |
A |
parsurv |
A |
parphi |
A |
parlamb |
A |
coef |
A vector of regression coefficient estimates. |
coef_ssd |
A vector of sample standard deviations of regression coefficient estimates. |
coef_ci |
The credible intervals for the regression coefficients. |
S0_m |
The estimated baseline survival at |
S_m |
The estimated survival at |
grids |
The sequance of points where baseline survival functions is estimated. |
DIC |
Deviance information criterion. |
NLLK |
Negative log pseudo-marginal likelihood. |
Chun Pan
Pan, C. and Cai, B. (2020). A Bayesian model for spatial partly interval-censored data. Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2020.1839497.
data(C) data(da2) nn<-apply(C,1,sum) # Number of iterations set to very small for CRAN automatic testing try2<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da2), model='spatialPIC',area=da2[,6],IC=da2[,7],scale.designX=TRUE,scale=c(1,0), binary=c(0,1),I=46,C=C,nn=nn,order=3,knots=c(0,2,6,max(da2[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_lamb=1,b_lamb=1, beta_iter=11,phi_iter=11,beta_cand=1,beta_sig0=10, x_user=NULL,total=50,burnin=10,thin=1,conf.int=0.95,seed=1)
data(C) data(da2) nn<-apply(C,1,sum) # Number of iterations set to very small for CRAN automatic testing try2<-PICBayes(formula=Surv(L,R,type='interval2')~x1+x2,data=data.frame(da2), model='spatialPIC',area=da2[,6],IC=da2[,7],scale.designX=TRUE,scale=c(1,0), binary=c(0,1),I=46,C=C,nn=nn,order=3,knots=c(0,2,6,max(da2[,1:2],na.rm=TRUE)+1), grids=seq(0.1,10.1,by=0.1),a_eta=1,b_eta=1,a_ga=1,b_ga=1,a_lamb=1,b_lamb=1, beta_iter=11,phi_iter=11,beta_cand=1,beta_sig0=10, x_user=NULL,total=50,burnin=10,thin=1,conf.int=0.95,seed=1)
Present output from function PICBayes
.
## S3 method for class 'PICBayes' summary(object, ...)
## S3 method for class 'PICBayes' summary(object, ...)
object |
Class PICBayes object. |
... |
Other arguments if any. |
An object of class summary
.
Take a Surv
object and transforms it into a data matrix with two columns, L and R,
representing the left and right points of observed time intervals. For right-censored data, R = NA.
SurvtoLR(x)
SurvtoLR(x)
x |
a |
The input Surv object should be in the form of Surv(L,R,type='interval2')
, where R = NA for right-censored data.
A data matrix with two variables:
L |
left-points of observed time intervals |
R |
right-points of observed time intervals |
Michael P. Fay, Pamela A. Shaw (2010). Exact and Asymptotic Weighted Logrank Tests for Interval Censored Data: The interval R Package. Journal of Statistical Software, 36 1-34.
library(survival) L<-c(45,6,0,46) R<-c(NA,10,7,NA) y<-Surv(L,R,type='interval2') SurvtoLR(y)
library(survival) L<-c(45,6,0,46) R<-c(NA,10,7,NA) y<-Surv(L,R,type='interval2') SurvtoLR(y)