
# Commands to sample from the "funnel" distribution using the Metropolis
# algorithm with updates to all components at once.  The stepsize to
# use is given as an argument.
#
# This version uses an initial state with v=9 and the xi=100.

dist-spec flog+.met,$1 \
  "v~Normal(0,3^2)     + x1~Normal(0,Exp(v)) \
 + x2~Normal(0,Exp(v)) + x3~Normal(0,Exp(v)) \
 + x4~Normal(0,Exp(v)) + x5~Normal(0,Exp(v)) \
 + x6~Normal(0,Exp(v)) + x7~Normal(0,Exp(v)) \
 + x8~Normal(0,Exp(v)) + x9~Normal(0,Exp(v))"
dist-initial flog+.met,$1 v=9 \
 x1=100 x2=100 x3=100 x4=100 x5=100 x6=100 x7=100 x8=100 x9=100
mc-spec flog+.met,$1 repeat 10000 metropolis $1
dist-mc flog+.met,$1 2000
