Bayesian Latent Factor on Image Regression with Nonignorable Missing Data
@article{wang2021bayesian,
title={Bayesian latent factor on image regression with nonignorable missing data},
author={Wang, Xiaoqing and Song, Xinyuan and Zhu, Hongtu},
journal={Statistics in Medicine},
volume={40},
number={4},
pages={920--932},
year={2021},
publisher={Wiley Online Library}
}
- Prerequisites:
- Eigen 3.3.7
- cmake 3.3.1
- C++ 14
- Set eigen path in
CmakeLists.txt
by revisinginclude_directories(<your-path>/eigen3 .)
- Compile and run as follows.
mkdir build
cd build
cmake ..
make
./exe
- Outputs
- Bayesian estimation of replications are saved in
out/rep_*.txt
. - Posterior samples of the latest replication are saved in
out/samples_*.txt
- Bayesian estimation of replications are saved in
- For changing simulation setting please refer to
Class Constant
including:-
setting
(model setup)- 1: Simulation 1 (with image)
- 0: Simulation 2
-
ssl
(Spike-and-Slab prior choice)- 1: Adjust SSL
- 0: SSL
-
model_type
(missing mechanism)- 1: Missing completely at random
- 2: Missing at random
- 3: Missing not at random
- Sample size (
$N$ ), number of eigenimages ($P$ ), number of repliations, true value, tunning parameters, hyperparameters etc.
-
- For data generation please refer to
Class Generate
. - For MCMC initial values, please refer to
Class Initial
. - All the C++ functions related to posterior sampling are contained in
Class MCMC
.
- For Simulation 1
- Preparation (code is not provided)
- Matlab: read preprocessed ADNI MRIs, save as .mat.
- Matlab: apply
svd
function for singular value decomposition and acquire eigenscores and eigenimages, save as .txt. - Python: create true image parameter, specify other true values, use the image (.mat) in step a to generate the dateset for simulatin 1, save as .txt.
- Cpp
- Copy and past the simulated dataset (.txt) into Cpp folder.
- Set
setting
to 1 inConstants.h
. - Specify simulation setting, such as sample size, number of MCMC iterfation, and true value in
Constants.h
andConstants.cpp
. - Compile and run.
- Preparation (code is not provided)
- For Simulation 2
- Set
setting
to 0 inConstants.h
. - Specify simulation setting, such as sample size, number of MCMC iterfation, and true value in
Constants.h
andConstants.cpp
. - Compile and run.
- Set
PS: Please feel free to contact the authors if you have any questions!