DPsurvint {DPpackage}R Documentation

Performs a Bayesian analysis for a semiparametric AFT regression model

Description

This function generates a posterior density sample from a semiparametric AFT regression model for interval-censored data.

Usage


DPsurvint(formula,prior,mcmc,state,status,
          data=sys.frame(sys.parent()),na.action=na.fail)

Arguments

formula a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. In the response vector, the unknown limits should be -999.
prior a list giving the prior information. The list includes the following parameter: a0 and b0 giving the hyperparameters for prior distribution of the precision parameter of the Dirichlet process prior, alpha giving the value of the precision parameter (it must be specified if a0 and b0 are missing, see details below), m0 and s0 giving the mean and variance of the normal prior distribution for the mean of the log normal baseline distribution, and, tau1 and tau2 giving the hyperparameters for the prior distribution of the variance of the log normal baseline distribution, and beta0 and Sbeta0 giving the hyperparameters of the normal prior distribution for the regression coefficients.
mcmc a list giving the MCMC parameters. The list must include the following integers: nburn giving the number of burn-in scans, nskip giving the thinning interval, nsave giving the total number of scans to be saved, ndisplay giving the number of saved scans to be displayed on the screen (the function reports on the screen when every ndisplay iterations have been carried out), and tune giving the Metropolis tuning parameter.
state a list giving the current value of the parameters. This list is used if the current analysis is the continuation of a previous analysis.
status a logical variable indicating whether this run is new (TRUE) or the continuation of a previous analysis (FALSE). In the latter case the current value of the parameters must be specified in the object state.
data data frame.
na.action a function that indicates what should happen when the data contain NAs. The default action (na.fail) causes DPsurvint to print an error message and terminate if there are any incomplete observations.

Details

This generic function fits a Mixture of Dirichlet process in a AFT regression model for interval censored data (Hanson and Johnson, 2004):

T_i = exp(- X_i β) V_i, i=1,...,n

V_i | G sim G

G | α, G_0 sim DP(α G_0)

where, G_0 = Log Normal(V| μ, σ). To complete the model specification, independent hyperpriors are assumed,

α | a_0, b_0 sim Gamma(a_0,b_0)

μ | m_0, s_0 sim N(m_0,s_0)

σ^{-1} | tau_1, tau_2 sim Gamma(tau_1/2,tau_2/2)

The precision or total mass parameter, α, of the DP prior can be considered as random, having a gamma distribution, Gamma(a_0,b_0), or fixed at some particular value. When α is random the method described by Escobar and West (1995) is used. To let α to be fixed at a particular value, set a_0 to NULL in the prior specification.

In the computational implementation of the model, G is considered as latent data and sampled partially with sufficient accuracy to be able to generate V_1,...,V_{n+1} which are exactly iid G, as proposed by Doss (1994). Both Ferguson's definition of DP and the Sethuraman-Tiwari (1982) representation of the process are used, as described in Hanson and Johnson (2004) to allow the inclusion of covariates.

A Metropolis-Hastings step is used to sample the fully conditional distribution of the regression coefficients and errors (see, Hanson and Johnson, 2004).

Value

An object of class DPsurvint representing the semiparametric AFT regression model fit. Generic functions such as print, plot, and summary have methods to show the results of the fit. The results include beta, mu, sigma, the precision parameter \alpha, and the number of clusters.
The function DPsurvpred can be used to extract posterior information of the survival curve.
The list state in the output object contains the current value of the parameters necessary to restart the analysis. If you want to specify different starting values to run multiple chains set status=TRUE and create the list state based on this starting values. In this case the list state must include the following objects:

beta giving the value of the regression coefficients.
v giving the value of the errors (it must be consistent with the data.
mu giving the mean of the lognormal baseline distribution.
sigma giving the variance of the lognormal baseline distribution.
alpha giving the value of the precision parameter.

Author(s)

Alejandro Jara Vallejos <Alejandro.JaraVallejos@med.kuleuven.be>

References

Doss, H. (1994). Bayesian nonparametric estimation for incomplete data using mixtures of Dirichlet priors. The Annals of Statistics, 22: 1763 - 1786.

Escobar, M.D. and West, M. (1995) Bayesian Density Estimation and Inference Using Mixtures. Journal of the American Statistical Association, 90: 577-588.

Hanson, T., and Johnson, W. (2004) A Bayesian Semiparametric AFT Model for Interval-Censored Data. Journal of Computational and Graphical Statistics, 13: 341-361.

Sethuraman, J., and Tiwari, R. C. (1982) Convergence of Dirichlet Measures and the Interpretation of their Parameter, in Statistical Decision Theory and Related Topics III (vol. 2), eds. S. S. Gupta and J. O. Berger, New York: Academic Press, pp. 305 - 315.

See Also

DPsurvpred

Examples

## Not run: 
    ####################################
    # A simulated Data Set
    ####################################
     ind<-rbinom(100,1,0.5)
     vsim<-ind*rnorm(100,1,0.25)+(1-ind)*rnorm(100,3,0.25)
     x1<-rep(c(0,1),50)
     x2<-rnorm(100,0,1)
     etasim<-x1+-1*x2
     time<-vsim*exp(-etasim)
     y<-matrix(-999,nrow=100,ncol=2)
     for(i in 1:100){
        for(j in 1:15){
         if((j-1)<time[i] & time[i]<=j){
            y[i,1]<-j-1
            y[i,2]<-j
         }
     }
     if(time[i]>15)y[i,1]<-15
     }

    # Initial state
      state <- NULL

    # MCMC parameters

      nburn<-50
      nsave<-100
      nskip<-1
      ndisplay<-50
      mcmc <- list(nburn=nburn,nsave=nsave,nskip=nskip,ndisplay=ndisplay,
                   tune=0.125)

    # Prior information
      prior <- list(alpha=10,beta0=rep(0,2),Sbeta0=diag(100000,2),m0=0,s0=1,
                    tau1=0.01,tau2=0.01)

    # Fit the model

      fit1 <- DPsurvint(y~x1+x2,prior=prior,mcmc=mcmc,state=state,status=TRUE) 
      fit1

    # Summary with HPD and Credibility intervals
      summary(fit1)
      summary(fit1,hpd=FALSE)

    # Plot model parameters (to see the plots gradually set ask=TRUE)
      plot(fit1,ask=FALSE)
      plot(fit1,ask=FALSE,nfigr=2,nfigc=2)      

    # Plot an specific model parameter (to see the plots gradually set ask=TRUE)
      plot(fit1,ask=FALSE,nfigr=1,nfigc=2,param="x1")   
      plot(fit1,ask=FALSE,nfigr=1,nfigc=2,param="mu")   
## End(Not run)      

[Package DPpackage version 1.0-0 Index]