Moment Fractional Bayes Factor Stochastic Search for Regression Models
Description
Estimate the edge inclusion probabilities for a regression model, using the moment fractional Bayes factor approach.
Usage
1 
Arguments
Corr 
qxq correlation matrix. 
nobs 
Number of observations. 
G_base 
Base model. 
h 
Parameter prior. 
C 
Costant who keeps the probability of all local moves bounded away from 0 and 1. 
n_tot_mod 
Maximum number of different models which will be visited by the algorithm, for each equation. 
n_hpp 
Number of the highest posterior probability models which will be returned by the procedure. 
Value
An object of class
list
with:
M_q

Matrix (qxq) with the estimated edge inclusion probabilities.
M_G

Matrix (n*n_hpp)xq with the n_hpp highest posterior probability models returned by the procedure.
M_P

Vector (n_hpp) with the n_hpp posterior probabilities of the models in M_G.
Author(s)
Davide Altomare (davide.altomare@gmail.com).
References
D. Altomare, G. Consonni and L. La Rocca (2013). Objective Bayesian search of Gaussian directed acyclic graphical models for ordered variables with nonlocal priors. Biometrics.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  data(SimDag6)
Corr=dataSim6$SimCorr[[1]]
nobs=50
q=ncol(Corr)
Gt=dataSim6$TDag
# Regression of Y(q) on Y(q1),...,Y(1)
Res_search=FBF_RS(Corr, nobs, matrix(0,1,(q1)), 1, 0.01, 1000, 10)
M_q=Res_search$M_q
M_G=Res_search$M_G
M_P=Res_search$M_P
Mt=rev(matrix(Gt[1:(q1),q],1,(q1))) #True Model
M_med=M_q
M_med[M_q>=0.5]=1
M_med[M_q<0.5]=0 #median probability model
sum(sum(abs(M_medMt))) #Structural Hamming Distance between the true DAG and the median probability DAG

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.