The "Bayesian_Latent_Class_Model_Fixed_Effects.RMD" file is a R Markdown script that conducts Bayesian latent class analysis to evaluate the accuracy of an index test (test which is under evaluation) against an imperfect reference test. Conditional dependence between tests is modeled using covariance between the diseased and nondiseased populations. The script requires certain input from the user. Those information needed are regrouped in the chunk bloc that covers rows 23-96 of the script. More advanced user can certainly edit other sections of the script to suit their need, but aside from the rows 23-96, the script is built to be fully automated. Below are the information the script expects from the user -> The name of the file containing the dataset (command row 24). The data should be provided as a .txt file in the form of a matrix with a single row and 4 columns labeled as n11, n10, n01, n00, where ***** n11=number of subjects positive on both tests ***** n10=number of subjects with index test positive and reference test negative ***** n01=number of subjects with index test negative and reference test positive ***** n00=number of subjects negative on both tests -> The number of precision digits to be displayed in the output (command row 25) -> The number of iterations to drop during the "burn-in" phase (command row 26) -> The number of iterations to keep to form the posterior samples (command row 27) -> The parameters of the beta prior distributions for the prevalence, the tests accuracy and the covariances (command rows 31-58) -> Initial values for key parameters (command rows 60-89) **************************************************************************************************************************************************** **************************************************************************************************************************************************** **************************************************************************************************************************************************** The "Bayesian_Latent_Class_Model_Random_Effects.RMD" file is a R Markdown script that conducts Bayesian latent class analysis to evaluate the accuracy of an index test (test which is under evaluation) against an imperfect reference test. Conditional dependence between tests is modeled using random effects. The Gauss-Hermite quadrature is used to speed up the program (Qu, Tan and Kutner, 1996)*. The script requires certain input from the user. Those information needed are regrouped in the chunk bloc that covers rows 23-96 of the script. More advanced user can certainly edit other sections of the script to suit their need, but aside from the rows 23-96, the script is built to be fully automated. Below are the information the script expects from the user -> The name of the file containing the dataset (command row 24). The data should be provided as a .txt file in the form of a matrix with as many rows as there are studies and 4 columns labeled as n11, n10, n01, n00, where ***** n11=number of subjects positive on both tests ***** n10=number of subjects with index test positive and reference test negative ***** n01=number of subjects with index test negative and reference test positive ***** n00=number of subjects negative on both tests -> The number of precision digits to be displayed in the output (command row 25) -> The number of iterations to drop during the "burn-in" phase (command row 26) -> The number of iterations to keep to form the posterior samples (command row 27) -> The number of independent chains to run (command row 28) -> The number of Gauss-Hermite quadrature points to use (command row 29) -> The parameters of the beta prior distributions for the prevalence and both tests accuracy (command rows 31-61) -> Initial values for key parameters (command rows 63-92) After running the script, the output will include the following -> The complete data from the .txt file -> A list of the prior distributions used on the parameters of the model -> A summary of the posterior estimates of the parameters of the model (including convergence diagnostic statistics) -> Summary plot displaying the posterior credible region and the posterior prediction region as well as a summary of the posterior parameter estimates needed to implement in RevMan software -> Convergence diagnostic plots for key parameters of the model. **************************************************************************************************************************************************** **************************************************************************************************************************************************** **************************************************************************************************************************************************** A dataset (Strongyloides_data.txt)** is provided as an example if the user would like to familiarize theirself with the script. It is a study conducted to estimate the prevalence of Strongyloides infection among a group of Cambodian refugees to Canada (Joseph, Gyorkos and Coupal, 1995) *Qu, Y., Tan, M., and Kutner, M.H. 1996. “Random effects models in latent class analysis for evaluating accuracy of diagnostic tests.” Biometrics, 52:797-810 **Joseph, L, Gyorkos, T, and Coupal, L. 1995 “Bayesian estimation of disease prevalence and the parameters of diagnostic tests in the absence of a gold standard” American Journal of Epidemiology 141, 263-272.