findPostMean: Posterior covariance matrix for a decomposable model.

Description Usage Arguments Value Author(s) References Examples

Description

Computes the posterior mean, which for decomposable models, is known in closed form.

Usage

1

Arguments

formula

A decomposable model formula.

alpha

The value of the hyperparameter alpha.

data

A data frame containing the contingency table. All cells must be included in data and the last column must be the cell counts. The number of variables in the contingency table must be at least 2.

Value

theta

An array giving the posterior mean of the log-linear parameters.

Author(s)

Matthew Friedlander

References

see vignette

Examples

1
2
3
4
data(czech)
formula <- freq ~ b*c + a*c*e + d*e + f
s <- findPostMean (formula, alpha = 1, data = czech)
print(s)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

(Intercept)          b1          c1          a1          e1          d1 
  3.1561271   0.9002899   1.0149757  -0.5565110  -0.4621862  -0.4387784 
         f1       b1:c1       a1:c1       a1:e1       c1:e1       d1:e1 
 -1.8051306  -2.8012942   0.5494842   0.4645452  -0.4380842   0.3412027 
   a1:c1:e1 
 -0.0194745 

bayesloglin documentation built on May 1, 2019, 9:45 p.m.