Readme

In this zip file you find:

1- R scripts
     1.1 main program:
           Program_MH_MCMC_R-COVID19.r
      1.2 Functions used by the main program:
          Funcoes_COVID19.r
          archtest.r
2-Data files (6 files name.txt):
    Data_COVID19_Brazil2.txt
    Data_COVID19_China2.txt
    Data_COVID19_India2.txt
    Data_COVID19_Italy2.txt
    Data_COVID19_Spain2.txt
    Data_COVID19_USA2.txt
3-Supplementary paper material:
     supplementary_information.pdf

################################################################

READEME FOR MEAN PROGRAM: MH_MCMC_R-COVID19 

############### PROGRAM: MH_MCMC_R-COVID19 #####################
#
# Packages:
# install.packages(tseries)
# install.packages("forecast")
# ------- 

# Functions:
# source('Funcoes_COVID19.r')
# source('archtest.r')
# ---------

# STEPS
#1. Reading Data Set: Reading data from each country with initial conditions for the parameters of each function.
#2. Choose a Model: For each model chosen, identify the average function and the order of the AR model (p)
#3. Initial conditions 
#4. Model Preview 
#   4.1 Shows the model with the initial conditions:
#   4.2 Z(t) ~ AR(p): Shows the order of the AR (p) model selected with the BIC criterion for the initial conditions;
#   4.3 Z(t) ~ ARCH(1): Apply the LM test for ARCH(1) model for Z (t) process 
#5. MH-MCMC
#   5.1 Acceptance Rate: Set acceptance rate for min 40% MCMC acceptance
#   5.2 Selecting chain: Apply the burning period: and selected chain.
#   5.3 Functions:
#----- Geweke criterion --- For mu(t)+AR(p)+ARCH(1)----#
#------Bayesian estimates -----------------------------#
#----- CPO and BIC ------------------------------------#
#------Influential points  ----------------------------# 
#------Graphic: Mean and IC ---------------------------#
#------Graphic: Z(t) Residual analysis ----------------#
#------Forecast----------------------------------------# 
#------Graphic: Forecast da Mean and CI ---------------#
#------Peak forecast ----------------------------------#
#----- Forecast the end of the pandemic ---------------#
#----  Forecast Error ---------------------------------#

#####################################################################