Example (BAYES LOGLINEAR command)

BAYES LOGLINEAR
     /CRITERIA ORDER = ASCENDING
     /INFERENCE ANALYSIS = BAYESFACTOR
     /TABLE gender BY minority
     /ESTBF MODEL = MULTINOMIAL FIXMARGIN = TOTAL PRIORTYPE = CONJUGATE
     /PRINT CELLS = OBSERVED EXPECTED STATISTICS = CHISQ .
  • CRITERIA specifies that categories are displayed in ascending order.
  • INFERENCE specifies the distribution for the analysis. The example uses Estimate Bayes Factor (BAYESFACTOR) as the ANALYSIS method.
  • TABLE constructs a contingency table to test the independence of two factors. The example constructs a table using gender as the row value and minority as the column value.
  • ESTBF specifies the model that is assumed for the observed data, a parameter that specifies if there are any fixed marginal totals for the contingency table, and the type of the prior distribution that is used when estimating the Bayes factor. The example specifies MULTINOMIAL as the model, TOTAL (fixed grand total) as the fixed marginal total, and CONJUGATE as the prior distribution.
  • PRINT specifies how the contents display in the output tables. The example uses the CELLS parameter to specify that both OBSERVED and EXPECTED cells counts will display in the output tables. The examples also uses the STATISTICS parameter to specify that the Pearson Chi-Square statistic (CHISQ) is used for testing of independence.