Extract a path (log) Bayes factors (BFs) from the log marginal posterior probabilities of two "dynaTree"-class objects
getBF(obj1, obj2)
Arguments
obj1: a "dynaTree"-class object built by dynaTree
obj2: another "dynaTree"-class object built by dynaTree
Details
Simply calculates a difference in log marginal posterior probabilities, setting BFs to zero for initial elements of the path where one of the objects has more zero marginal probabilities than the other. The BF is for the model in obj1 over obj2. If the objects are the output of repeated fits as obtained from dynaTrees, then multiple traces are returned
Returns
Returns a vector or matrix of a trace(s) of Bayes factors that can be plotted; see examples below
References
Taddy, M.A., Gramacy, R.B., and Polson, N. (2011). Dynamic trees for learning and design
Journal of the American Statistical Association, 106(493), pp. 109-123; arXiv:0912.1586
Gramacy, R.B., Taddy, M.A., and S. Wild (2011). Variable Selection and Sensitivity Analysis via Dynamic Trees with anApplication to Computer Code Performance Tuning