The PLM Procedure

Analysis Based on Posterior Estimates

If an item store is saved from a Bayesian analysis (by PROC GENMOD or PROC PHREG or PROC LIFEREG), then PROC PLM can perform sampling-based inference based on Bayes posterior estimates that are saved in the item store. For example, the following statements request a Bayesian analysis and save the results to an item store named sasuser.gmd. For the Bayesian analysis, the random number generator seed is set to 1. By default, a noninformative distribution is set as the prior distribution for the regression coefficients and the posterior sample size is 10,000.

proc genmod data=gs;
   class a b;
   model y = a b;
   bayes seed=1;
   store sasuser.gmd / label='Bayesian Analysis';
run;

When the PLM procedure opens the item store sasuser.gmd, it detects that the results were saved from a Bayesian analysis. The posterior sample of regression coefficient estimates are then loaded to perform statistical inference tasks.

The majority of postprocessing tasks involve inference based on an estimable linear function bold upper L ModifyingAbove bold-italic beta With caret, which often requires its mean and variance. When the standard frequentist analyses are performed, the mean and variance have explicit forms because the parameter estimate ModifyingAbove bold-italic beta With caret is analytically tractable. However, explicit forms are not usually available when Bayesian models are fitted. Instead, empirical means and variance-covariance matrices for the estimable function are constructed from the posterior sample.

Let ModifyingAbove bold-italic beta With caret Subscript i Baseline comma i equals 1 comma ellipsis comma upper N Subscript p Baseline denote the upper N Subscript p vectors of posterior sample estimates of bold-italic beta saved in sasuser.gmd. Use these vectors to construct the posterior sample of estimable functions bold upper L bold-italic beta Subscript i. The posterior mean of the estimable function is thus

ModifyingAbove bold upper L ModifyingAbove bold-italic beta With caret With bar equals StartFraction 1 Over upper N Subscript p Baseline EndFraction sigma-summation Underscript i equals 1 Overscript upper N Subscript p Baseline Endscripts bold upper L ModifyingAbove bold-italic beta With caret Subscript i

and the posterior variance of the estimable function is

bold upper V left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis equals StartFraction 1 Over upper N Subscript p Baseline minus 1 EndFraction sigma-summation Underscript i equals 1 Overscript upper N Subscript p Baseline Endscripts left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret Subscript i Baseline minus ModifyingAbove bold upper L ModifyingAbove bold-italic beta With caret With bar right-parenthesis squared

Sometimes statistical inference on a transformation of bold upper L ModifyingAbove bold-italic beta With caret is requested. For example, the EXP option for the ESTIMATE and LSMESTIMATE statements requests analysis based on exp left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis, exponentiation of the estimable function. If this type of analysis is requested, the posterior sample of transformed estimable functions is constructed by transforming each of the estimable function evaluated at the posterior sample: f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret Subscript i Baseline right-parenthesis comma i equals 1 comma ellipsis comma upper N Subscript p Baseline. The posterior mean and variance for f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis are then computed from the constructed sample to make the inference:

ModifyingAbove f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis With bar equals StartFraction 1 Over upper N Subscript p Baseline EndFraction sigma-summation Underscript i equals 1 Overscript upper N Subscript p Baseline Endscripts f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret Subscript i Baseline right-parenthesis
bold upper V left-parenthesis f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis right-parenthesis equals StartFraction 1 Over upper N Subscript p Baseline minus 1 EndFraction sigma-summation Underscript i equals 1 Overscript upper N Subscript p Baseline Endscripts left-parenthesis f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret Subscript i Baseline right-parenthesis minus ModifyingAbove f left-parenthesis bold upper L ModifyingAbove bold-italic beta With caret right-parenthesis With bar right-parenthesis squared

After obtaining the posterior mean and variance, the PLM procedure proceeds to perform statistical inference based on them.

Last updated: December 09, 2022