#========================================================================
# !!! REPLACE c:/ BY NAME OF DIRECTORY WHERE YOU HAVE SAVED THE FILES !!!
#========================================================================

# Check if program syntax is correct
check('c:/conddiagmodel.txt')

# Read data
data('c:/conddiagdata.txt')


# Compile program
compile(1)


# Read initial values for unobserved random variables
inits(1,'c:/conddiaginits.txt')
gen.inits()

# Start Gibbs sampler
update(5000)

# Keep samples of the following parameters
set(pi)
set(sens1)
set(spec1)
set(sens2)
set(spec2)
set(covs12)
set(covc12)

# Run the Gibbs sampler for more iterations
update(20000)

# History plots of the parameters of interest
history(*)

# Posterior density plots of the parameters of interest
density(*)

# Summary statistics of the parameters of interest
stats(*)



