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

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

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

# Compile program
compile(1)


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

# Start Gibbs sampler
update(5000)

# Keep samples of the following parameters

set(prev)
set(s1)
set(s2)
set(c1)
set(c2)
set(a11)
set(a21)
set(a10)
set(a20)
set(b1)
set(b0)


# 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(*)



