The repository DualProbitCDF contains the R package and code implementing the estimation strategy proposed in the article:
“Multivariate Gaussian cumulative distribution functions as the marginal likelihood of their dual Bayesian probit model” by A. Fasano and F. Denti, accepted for publication in Biometrika (2025, In press).
In addition to the package itself, the repository includes all the scripts needed to reproduce the simulation studies and the figures presented in the paper.
-
Open the R Project
Open the R project fileDualProbitCDF.Rprojand set it as your working directory. -
Install the R Package
Install the included R packageEPmvnCDF, which stands for
Expectation Propagation for the estimation of Multivariate Normal Cumulative Distribution Functions, viainstall.packages("EPmvnCDF_0.2.0.tar.gz", repos = NULL, type = "source")
Otherwise open the
Rproject contained in theEPmvnCDF/folder and build the package from there.
Then you can run the code.
In particular:
-
Scripts starting with the letter
Acontain utility functions that are reused throughout the project. -
Scripts starting with the letter
Bcontain the code to run the four estimation methods described in the main paper:- our Expectation Propagation (EP) proposal, implemented using both Cholesky and Eigenvalue decompositions;
- the method in the
TruncatedNormalpackage; - the methods in the
tlrmvnmvtpackage; - the Orthant method by Ridgway (2016), implemented in C++
(see the
cpp_source/directory).
The output of each method is stored in the corresponding subfolder within the
RDS/directory. -
The
.Rmdfile starting with the letterCextracts and processes the simulation results stored in the.RDSfiles. It creates summary data frames (saved inRDS/) and saves the figures used in the paper (inNewFigures/). -
Scripts starting with the letter
Dreproduce an additional simulation study included in the Supplementary Material.