 This is an example of input file for DMM.exe
 It implements the nile river flow exercise
 G.Fiorentini, C.Planas and A.Rossi - Jan 2012
 
 Model: y(t)  = mu(t)+[(S(1t)-1)*delta^(1/2)+(2-S(1t))]*Ve^(1/2)*e(t)   
        mu(t) = mu(t-1)+[S(2t)-1]*Veps^(1/2)*eps(t)
 State-space rep:
  x(t) = mu(t)
  u(t) = (e(t),eps(t)) 
 Paramaeters:
  Ve    = theta(1)  
  Veps  = theta(2)  
  delta = theta(3)

 State-space format:   y(t) = c(t)z(t) + H(t)x(t)   + G(t)u(t)
                       x(t) = a(t)     + F(t)x(t-1) + R(t)u(t)

 y(t) (ny x 1)          ny  = # of endogenous series
 z(t) (nz x 1)          nz  = # of exogenous series
 x(t) (nx x 1)          nx  = # of continous states 
 u(t) (nu x 1)          nu  = # of shocks
 c(t) (ny x nz x ns1)        
 H(t) (ny x nx x ns2)   
 G(t) (ny x nu x ns3)   
 a(t) (nx x ns4)        
 F(t) (nx x nx x ns5)   
 R(t) (nx x nu x ns6)   
 
 Namelist ssm contains:
 nx      = number of continuous states 
 nu      = number of shocks
 d(1)    = order of integration of the system
 d(2)    = number of non-stationary continuous state variables
 nv      = number of discrete S variables (<=6)
 Dllname = path and name of the dll or the Matlab file 
 check   = to debug the system matrices c, H, G, a, F, and R
  
 &ssm 
  nx=1 nu=2 d=1 1 nv=2 check=n estimation=BA dllname = path\NILE1.m
 &end 

 Namelist Sj describes discrete latent variables Sj, j = 1,...,nv:
 dynSj    = time series dynamics for Sj (I=Independent,M=Markov)
 nSj = number of states for Sj
 hypSj    = hyperparameters of Dirichlet(alpha1,...,alphak) 
            prior pdf for the transition probability parameters 
            of dimension k ordered by columns           
 matSj    = matrices impacted by Sj (one or more of c H G a F R)
 
 &S1 dynS1=I nS1=2 hypS1(1,1)=16 2 matS1=G &end     
 
 &S2 dynS2=I nS2=2 hypS2(1,1)=16 2 matS2=R &end
  
 Namelist prior describes priors pdf of model parameters (except transition probs):
 nt       = number of theta parameters
 pdftheta = prior distribution (NT=Truncated Normal; BE=Beta; IG=Inverse Gamma) 
 hyptheta = hyperparameter of prior pdf (mean or hyp,sd or hyp,lower bound, upper bound)  
            Note: if thetahyp(3,j)=thetahyp(4,j) the parameter is not estimated and its 
            value is fixed at lb=ub

 &prior nt = 3 
  pdftheta(1) = IG hyptheta(1,1) = 6000 6  0 500000
  pdftheta(2) = IG hyptheta(1,2) = 6000 6  0 500000  
  pdftheta(3) = BE hyptheta(1,3) = 2 4  1 20 
 &end  
  
  ML:
  pdftheta(1) = IG hyptheta(1,1) = 10000 6  0 50000
  pdftheta(2) = IG hyptheta(1,2) = 10000 6  0 50000  
  pdftheta(3) = BE hyptheta(1,3) = 6     4  1 20 

  Fixed:
  pdftheta(1) = IG hyptheta(1,1) = 60000 6 12000 12000
  pdftheta(2) = IG hyptheta(1,2) = 60000 6 9000 9000
  pdftheta(3) = BE hyptheta(1,3) = 2 4 4 4 
  
  Bayes:
  pdftheta(1) = IG hyptheta(1,1) = 60000 6 0 50000
  pdftheta(2) = IG hyptheta(1,2) = 60000 6 0 50000
  pdftheta(3) = BE hyptheta(1,3) = 2     4 1 20 

 Namelist mcmc contains the Markov Chain Monte Carlo options:
 seed        = seed of random number generator (0-999; 0 default)
 thin        = thinning 
 burnin      = burn-in period
 simulrec    = number of recorded samples
 hbl         = block length discrete latent variable (1:GCK, >1: AMH)
  
 &mcmc 
  seed=0 thin=1 burnin=100 simulrec=500 hbl=1 MargLik=y
 &end 

 Namelist dataset provides data:
 nobs    = number of observations
 ny      = number of endogenous series
 nz      = number of exogenous series
 nf      = number of forecasts
 datasim = simulate the data {Y,N}
 obs     = a matrix of dimension nobs x ny if nz = 0
           and (nobs+nf) x (ny+nz) if nz > 0. 
           any value is allowed for the endogenous vars out-of-sample 

 Note: use can be made of -99999 to assign missing values to the endogenous variables  

 &dataset T=100 ny=1 nz=0 nf=10 datasim=n obs=
  1120
  1160
  963
  1210
  1160
  1160
  813
  1230
  1370
  1140
  995
  935
  1110
  994
  1020
  960
  1180
  799
  958
  1140
  1100
  1210
  1150
  1250
  1260
  1220
  1030
  1100
  774
  840
  874
  694
  940
  833
  701
  916
  692
  1020
  1050
  969
  831
  726
  456
  824
  702
  1120
  1100
  832
  764
  821
  768
  845
  864
  862
  698
  845
  744
  796
  1040
  759
  781
  865
  845
  944
  984
  897
  822
  1010
  771
  676 
  649
  846
  812
  742
  801
  1040
  860
  874
  848
  890
  744
  749
  838
  1050
  918
  986
  797
  923
  975
  815
  1020
  906
  901
  1170
  912
  746
  919
  718
  714
  740 
 &end

 
