bdgraph.mpl {BDgraph} | R Documentation |

This function consists of several sampling algorithms for Bayesian model determination in undirected graphical models based on mariginal pseudo-likelihood.
To speed up the computations, the birth-death MCMC sampling algorithms are implemented in parallel using OpenMP in `C++`

.

bdgraph.mpl( data, n = NULL, method = "ggm", transfer = TRUE, algorithm = "bdmcmc", iter = 5000, burnin = iter / 2, g.prior = 0.5, g.start = "empty", jump = NULL, alpha = 0.5, save = FALSE, cores = NULL, operator = "or" )

`data` |
There are two options: (1) an ( |

`n` |
The number of observations. It is needed if the |

`method` |
A character with two options |

`transfer` |
For only count data which |

`algorithm` |
A character with two options |

`iter` |
The number of iteration for the sampling algorithm. |

`burnin` |
The number of burn-in iteration for the sampling algorithm. |

`g.prior` |
For determining the prior distribution of each edge in the graph.
There are two options: a single value between |

`g.start` |
Corresponds to a starting point of the graph. It could be an ( |

`jump` |
It is only for the BDMCMC algorithm ( |

`alpha` |
Value of the hyper parameter of Dirichlet, which is a prior distribution. |

`save` |
Logical: if FALSE (default), the adjacency matrices are NOT saved. If TRUE, the adjacency matrices after burn-in are saved. |

`cores` |
The number of cores to use for parallel execution.
The case |

`operator` |
A character with two options |

An object with `S3`

class `"bdgraph"`

is returned:

`p_links` |
An upper triangular matrix which corresponds the estimated posterior probabilities of all possible links. |

For the case "save = TRUE" is returned:

`sample_graphs` |
A vector of strings which includes the adjacency matrices of visited graphs after burn-in. |

`graph_weights` |
A vector which includes the waiting times of visited graphs after burn-in. |

`all_graphs` |
A vector which includes the identity of the adjacency matrices for all iterations after burn-in. It is needed for monitoring the convergence of the BD-MCMC algorithm. |

`all_weights` |
A vector which includes the waiting times for all iterations after burn-in. It is needed for monitoring the convergence of the BD-MCMC algorithm. |

Reza Mohammadi a.mohammadi@uva.nl, Adrian Dobra, and Johan Pensar

Dobra, A. and Mohammadi, R. (2018). Loglinear Model Selection and Human Mobility, *Annals of Applied Statistics*, 12(2):815-845

Mohammadi, A. and Wit, E. C. (2015). Bayesian Structure Learning in Sparse Gaussian Graphical Models, *Bayesian Analysis*, 10(1):109-138

Mohammadi, A. and Dobra, A. (2017). The `R`

Package BDgraph for Bayesian Structure Learning in Graphical Models, *ISBA Bulletin*, 24(4):11-16

Pensar, J. et al (2017) Marginal pseudo-likelihood learning of discrete Markov network structures, *Bayesian Analysis*, 12(4):1195-215

Mohammadi, R. and Wit, E. C. (2019). BDgraph: An `R`

Package for Bayesian Structure Learning in Graphical Models, *Journal of Statistical Software*, 89(3):1-30

`bdgraph`

, `bdgraph.sim`

, `summary.bdgraph`

, `compare`

# Generating multivariate normal data from a 'random' graph data.sim <- bdgraph.sim( n = 70, p = 5, size = 7, vis = TRUE ) bdgraph.obj <- bdgraph.mpl( data = data.sim, iter = 500 ) summary( bdgraph.obj ) # To compare the result with true graph compare( data.sim, bdgraph.obj, main = c( "Target", "BDgraph" ) )

[Package *BDgraph* version 2.64 Index]