Results: 05_mcmc_diag_demo.sas

MCMC Diagnostics

The data are taken from Crowder (1978). The Seeds data set is a factorial layout, with two types of seeds, O. aegyptiaca 75 and O. aegyptiaca 73, and two root extracts, bean and cucumber. You observe r, which is the number of germinated seeds, and n, which is the total number of seeds. The independent variables are seed and extract.

The Print Procedure

Data Set WORK.SEEDS

Obs r n seed extract ind
1 10 39 0 0 1
2 23 62 0 0 2
3 23 81 0 0 3
4 26 51 0 0 4
5 17 39 0 0 5
6 5 6 0 1 6
7 53 74 0 1 7
8 55 72 0 1 8
9 32 51 0 1 9
10 46 79 0 1 10
11 10 13 0 1 11
12 8 16 1 0 12
13 10 30 1 0 13
14 8 28 1 0 14
15 23 45 1 0 15
16 0 4 1 0 16
17 3 12 1 1 17
18 22 41 1 1 18
19 15 30 1 1 19
20 32 51 1 1 20
21 3 7 1 1 21

The CONTENTS Procedure

The Contents Procedure

WORK.SEEDS

Attributes

Data Set Name WORK.SEEDS Observations 21
Member Type DATA Variables 5
Engine V9 Indexes 0
Created 12/05/2018 00:24:23 Observation Length 40
Last Modified 12/05/2018 00:24:23 Deleted Observations 0
Protection   Compressed CHAR
Data Set Type   Reuse Space NO
Label   Point to Observations YES
Data Representation HP_UX_64, RS_6000_AIX_64, SOLARIS_64, HP_IA64 Sorted NO
Encoding latin1 Western (ISO)    

Engine/Host Information

Engine/Host Dependent Information
Data Set Page Size 65536
Number of Data Set Pages 2
Number of Data Set Repairs 0
Filename /saswork/SAS_work8C54000006EE_sp20635/SAS_workEA33000006EE_sp20635/seeds.sas7bdat
Release Created 9.0401M5
Host Created SunOS
Inode Number 5920
Access Permission rw-r--r--
Owner Name t844523
File Size 192KB
File Size (bytes) 196608

Varnum

Variables in Creation Order
# Variable Type Len
1 r Num 8
2 n Num 8
3 seed Num 8
4 extract Num 8
5 ind Num 8

The MCMC Procedure

The MCMC Procedure

Number of Observations

Number of Observations Read
Number of Observations Used
21
21

Parameters

Parameters
Block Parameter Sampling
Method
Initial
Value
Prior Distribution
1 s2 Conjugate 1.0000 igamma(0.01, s=0.01)
2 beta0 N-Metropolis 0 general(0)
  beta1   0 general(0)
  beta2   0 general(0)
  beta3   0 general(0)

Random-Effects Parameters

Random Effect Parameters
Parameter Sampling
Method
Subject Number of
Subjects
Subject
Values
Prior
Distribution
delta N-Metropolis ind 21 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... normal(w, var=s2)

The MCMC Procedure

Posterior Statistics

Summary and Interval Statistics

Posterior Summaries and Intervals
Parameter N Mean Standard
Deviation
95% HPD Interval
beta0 20000 -0.5570 0.1929 -0.9422 -0.1816
beta1 20000 0.0776 0.3276 -0.5690 0.7499
beta2 20000 1.3667 0.2923 0.8463 1.9724
beta3 20000 -0.8469 0.4718 -1.7741 0.0742
s2 20000 0.1171 0.0993 0.00163 0.3045

The MCMC Procedure

Convergence Diagnostics

Monte Carlo Standard Errors

Monte Carlo Standard Errors
Parameter MCSE Standard
Deviation
MCSE/SD
beta0 0.0101 0.1929 0.0523
beta1 0.0175 0.3276 0.0533
beta2 0.0138 0.2923 0.0472
beta3 0.0269 0.4718 0.0570
s2 0.00417 0.0993 0.0419

Autocorrelations

Posterior Autocorrelations
Parameter Lag 1 Lag 5 Lag 10 Lag 50
beta0 0.9483 0.7800 0.6236 0.1669
beta1 0.9598 0.8264 0.6929 0.1694
beta2 0.9290 0.7108 0.5312 0.1070
beta3 0.9646 0.8450 0.7234 0.2149
s2 0.7494 0.5823 0.4598 0.0969

Geweke Diagnostics

Geweke Diagnostics
Parameter z Pr > |z|
beta0 1.1428 0.2531
beta1 -1.2485 0.2118
beta2 0.3081 0.7580
beta3 -0.2146 0.8300
s2 -0.6170 0.5373

Raftery-Lewis Diagnostics

Raftery-Lewis Diagnostics
Quantile=0.025 Accuracy=+/-0.005 Probability=0.95 Epsilon=0.001
Parameter Number of Samples Dependence
Factor
Burn-In Total Minimum
beta0 35 37938 3746 10.1276
beta1 51 55996 3746 14.9482
beta2 32 33938 3746 9.0598
beta3 44 47893 3746 12.7851
s2 153 162690 3746 43.4303

Heidelberger-Welch Diagnostics

Heidelberger-Welch Diagnostics
Parameter Stationarity Test Half-Width Test
Cramer-von
Mises Stat
p-Value Test
Outcome
Iterations
Discarded
Half-Width Mean Relative
Half-Width
Test
Outcome
beta0 0.1114 0.5316 Passed 0 0.0216 -0.5570 -0.0387 Passed
beta1 0.0930 0.6202 Passed 0 0.0352 0.0776 0.4538 Failed
beta2 0.0942 0.6139 Passed 0 0.0298 1.3667 0.0218 Passed
beta3 0.0887 0.6429 Passed 0 0.0561 -0.8469 -0.0662 Passed
s2 0.0536 0.8539 Passed 0 0.00876 0.1171 0.0748 Passed

Effective Sample Sizes

Effective Sample Sizes
Parameter ESS Autocorrelation
Time
Efficiency
beta0 366.1 54.6309 0.0183
beta1 351.6 56.8820 0.0176
beta2 449.1 44.5309 0.0225
beta3 308.1 64.9051 0.0154
s2 568.5 35.1815 0.0284

The MCMC Procedure

Diagnostic Plots

beta0

Diagnostic Plots for beta0

beta1

Diagnostic Plots for beta1

beta2

Diagnostic Plots for beta2

beta3

Diagnostic Plots for beta3

s2

Diagnostic Plots for s2

Gelman Rubin Diagnostics

The Print Procedure

Data Set WORK.GELMANRUBIN

Obs Between-chain Within-chain Estimate UpperBound Parameter
1 0.4864 0.0419 1.0692 1.0595 beta0
2 0.6238 0.1406 1.0352 1.0348 beta1
3 0.2313 0.1101 1.0389 1.0418 beta2
4 1.5103 0.2837 1.0395 1.0380 beta3
5 . . . .