The LIFEREG Procedure 
BAYES Statement 
Table 48.1 summarizes the options available in the BAYES statement.
Option 
Description 

Monte Carlo Options 

specifies initial values of the chain 

specifies that maximum likelihood estimates be used as initial values of the chain 

specifies the use of a Metropolis step 

specifies the number of burnin iterations 

specifies the number of iterations after burnin 

specifies the random number generator seed 

controls the thinning of the Markov chain 

Model and Prior Options 

specifies the prior of the regression coefficients 

specifies the prior of the exponential scale parameter 

specifies the prior of the threeparameter gamma shape parameter 

specifies the prior of the scale parameter 

specifies the prior of the Weibull scale parameter 

specifies the prior of the Weibull shape parameter 

Summary Statistics and Convergence Diagnostics 

displays convergence diagnostics 

displays diagnostic plots 

displays summary statistics of the posterior samples 

Posterior Samples 

names a SAS data set for the posterior samples 
The following list describes these options and their suboptions.
specifies a normal distribution. The normaloptions include the following:
specifies that the normal prior, conditional on the current Markov chain value of the locationscale model precision parameter , is , where and are the mean and covariance of the normal prior specified by other normal options.
specifies a SAS data set that contains the mean and covariance information of the normal prior. The data set must have a _TYPE_ variable to represent the type of each observation and a variable for each regression coefficient. If the data set also contains a _NAME_ variable, the values of this variable are used to identify the covariances for the _TYPE_=’COV’ observations; otherwise, the _TYPE_=’COV’ observations are assumed to be in the same order as the explanatory variables in the MODEL statement. PROC LIFEREG reads the mean vector from the observation with _TYPE_=’MEAN’ and reads the covariance matrix from observations with _TYPE_=’COV’. For an independent normal prior, the variances can be specified with _TYPE_=’VAR’; alternatively, the precisions (inverse of the variances) can be specified with _TYPE_=’PRECISION’.
specifies the normal prior , where is a diagonal matrix with diagonal elements equal to the variances of the corresponding ML estimator. By default, .
specifies the normal prior , where is the identity matrix.
specifies a flat prior—that is, the prior that is proportional to a constant ( for all ).
computes the autocorrelations of lags given by LAGS= list for each parameter. Elements in the list are truncated to integers and repeated values are removed. If the LAGS= option is not specified, autocorrelations of lags 1, 5, 10, and 50 are computed for each variable. See the section Autocorrelations for details.
computes Carlin’s estimate of the effective sample size, the correlation time, and the efficiency of the chain for each parameter. See the section Effective Sample Size for details.
computes an estimate of the Monte Carlo standard error for each parameter. See the section Standard Error of the Mean Estimate for details.
specifies the level for the stationarity test.
specifies the level for the halfwidth test.
specifies a positive number such that if the halfwidth is less than times the sample mean of the retained iterates, the halfwidth test is passed.
specifies the number of parallel chains used to compute the diagnostic, and must be 2 or larger. The default is NCHAIN=3. If an INITIAL= data set is used, NCHAIN defaults to the number of rows in the INITIAL= data set. If any number other than this is specified with the NCHAIN= option, the NCHAIN= value is ignored.
specifies the significance level for the upper bound. The default is ALPHA=0.05, resulting in a 97.5% bound.
specifies the fraction for the first window.
specifies the fraction for the second window.
specifies the order (a value between 0 and 1) of the quantile of interest. The default is 0.025.
specifies a small positive number as the margin of error for measuring the accuracy of estimation of the quantile. The default is 0.005.
specifies the probability of attaining the accuracy of the estimation of the quantile. The default is 0.95.
specifies the tolerance level (a small positive number) for the stationary test. The default is 0.001.
specifies that Gibbs sampling be performed on the exponential distribution scale parameter and the prior distribution for the scale parameter. This prior distribution applies only when the exponential distribution and no covariates are specified.
A gamma prior with density is specified by EXPSCALEPRIOR=GAMMA, which can be followed by one of the following gammaoptions enclosed in parentheses. The hyperparameters and are the shape and inversescale parameters of the gamma distribution, respectively. See the section Gamma Prior for more details. The default is .
specifies independent distribution, where is the MLE of the exponential scale parameter. With this choice of hyperparameters, the mean of the prior distribution is and the variance is . By default, c=.
and
specify the prior.
specifies the prior.
specifies the prior.
An improper prior with density proportional to is specified with EXPSCALEPRIOR=IMPROPER.
specifies the prior distribution for the gamma distribution shape parameter. If you do not specify any options in a gamma model, the prior for the shape is used. You can specify MEAN= and VAR= or RELVAR= options, either alone or together, to specify the mean and variance of the normal prior for the gamma shape parameter.
specifies a normal prior . By default, a=.
specifies the normal prior , where is the variance of the MLE of the shape parameter. By default, b=.
specifies the normal prior . By default, c=.
specifies the SAS data set that contains the initial values of the Markov chains. The INITIAL= data set must contain all the variables of the model. You can specify multiple rows as the initial values of the parallel chains for the GelmanRubin statistics, but posterior summaries, diagnostics, and plots are computed only for the first chain. If the data set also contains the variable _SEED_, the value of the _SEED_ variable is used as the seed of the random number generator for the corresponding chain.
specifies that maximum likelihood estimates of the model parameters be used as initial values of the Markov chain. If this option is not specified, estimates of the mode of the posterior distribution obtained by optimization are used as initial values.
specifies the use of a Metropolis step to generate Gibbs samples for posterior distributions that are not log concave. The default value is METROPOLIS=YES.
specifies the number of burnin iterations before the chains are saved. The default is 2000.
specifies the number of iterations after the burnin. The default is 10000.
names the SAS data set that contains the posterior samples. See the section OUTPOST= Output Data Set for more information. Alternatively, you can create the output data set by specifying an ODS OUTPUT statement as follows:
controls the display of diagnostic plots. Three types of plots can be requested: trace plots, autocorrelation function plots, and kernel density plots. By default, the plots are displayed in panels unless the global plot option UNPACK is specified. Also, when specifying more than one type of plots, the plots are displayed by parameters unless the global plot option GROUPBY is specified. When you specify only one plot request, you can omit the parentheses around the plot request. For example:
plots=none plots(unpack)=trace plots=(trace autocorr)
You must enable ODS Graphics before requesting plots. For example, the following SAS statements enable ODS Graphics:
ods graphics on; proc lifereg; model y=x; bayes plots=trace; run; end; ods graphics off;
creates a fringe plot on the X axis of the density plot.
specifies that the plots be grouped by type.
specifies that the plots be grouped by parameter.
specifies that autocorrelations be plotted up to lag n. If this option is not specified, autocorrelations are plotted up to lag 50.
displays a fitted penalized Bspline curve for each trace plot.
specifies that all paneled plots be unpacked, meaning that each plot in a panel is displayed separately.
specifies all types of plots. PLOTS=ALL is equivalent to specifying PLOTS=(TRACE AUTOCORR DENSITY).
displays the autocorrelation function plots for the parameters.
displays the kernel density plots for the parameters.
suppresses all diagnostic plots.
displays the trace plots for the parameters. See the section Visual Analysis via Trace Plots for details.
specifies that Gibbs sampling be performed on the locationscale model scale parameter and the prior distribution for the scale parameter.
A gamma prior with density is specified by SCALEPRIOR=GAMMA, which can be followed by one of the following gammaoptions enclosed in parentheses. The hyperparameters and are the shape and inversescale parameters of the gamma distribution, respectively. See the section Gamma Prior for details. The default is .
specifies independent distribution, where is the MLE of the scale parameter. With this choice of hyperparameters, the mean of the prior distribution is and the variance is . By default, c=.
and
specify the prior.
specifies the prior.
specifies the prior.
specifies an integer seed in the range 1 to for the random number generator in the simulation. Specifying a seed enables you to reproduce identical Markov chains for the same specification. If the SEED= option is not specified, or if you specify a nonpositive seed, a random seed is derived from the time of day.
controls the probabilities of the credible intervals. The ALPHA= values must be between 0 and 1. Each ALPHA= value produces a pair of 100(1–ALPHA)% equaltail and HPD intervals for each parameters. The default is ALPHA=0.05, which yields the 95% credible intervals for each parameter.
requests the percentile points of the posterior samples. The PERCENT= values must be between 0 and 100. The default is PERCENT=25, 50, 75, which yields the 25th, 50th, and 75th percentile points, respectively, for each parameter.
produces the posterior correlation matrix.
produces the posterior covariance matrix.
produces the means, standard deviations, and percentile points for the posterior samples. The default is to produce the 25th, 50th, and 75th percentile points, but you can use the global PERCENT= option to request specific percentile points.
produces equaltail credible intervals and HPD intervals. The defult is to produce the 95% equaltail credible intervals and 95% HPD intervals, but you can use the global ALPHA= option to request intervals of any probabilities.
suppresses printing all summary statistics.
controls the thinning of the Markov chain. Only one in every samples is used when THINNING=, and if NBI= and NMC=, the number of samples kept is
where [] represents the integer part of the number . The default is THINNING=1.
specifies that Gibbs sampling be performed on the Weibull model scale parameter and the prior distribution for the scale parameter. This option applies only when a Weibull distribution and no covariates are specified. When this option is specified, PROC LIFEREG performs Gibbs sampling on the Weibull scale parameter, which is defined as , where is the intercept term.
A gamma prior is specified by WEIBULLSCALEPRIOR=GAMMA, which can be followed by one of the following gammaoptions enclosed in parentheses. The gamma probability density is given by . The hyperparameters and are the shape and inversescale parameters of the gamma distribution, respectively. See the section Gamma Prior for details about the gamma prior. The default is .
specifies independent distribution, where is the MLE of the Weibull scale parameter. With this choice of hyperparameters, the mean of the prior distribution is and the variance is . By default, c=.
and
specify the prior.
specifies the prior.
specifies the prior.
specifies that Gibbs sampling be performed on the Weibull model shape parameter and the prior distribution for the shape parameter. When this option is specified, PROC LIFEREG performs Gibbs sampling on the Weibull shape parameter, which is defined as , where is the locationscale model scale parameter.
A gamma prior with density is specified by WEIBULLSHAPEPRIOR=GAMMA, which can be followed by one of the following gammaoptions enclosed in parentheses. The hyperparameters and are the shape and inversescale parameters of the gamma distribution, respectively. See the section Gamma Prior for details about the gamma prior. The default is .
specifies independent distribution, where is the MLE of the Weibull shape parameter. With this choice of hyperparameters, the mean of the prior distribution is and the variance is . By default, c=.
and
specify the prior.
specifies the prior.
specifies the prior.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.