Great Hector! Thanks so much!
I knew there was an initial conditions problem, so I started to try the swarm to find better initial conditions, but then found it pretty inefficient and got distracted by other things. It seems the way you have set it up works much better!
Amusing that your dataset works better than mine -- I got mine from Frank Diebold's website.
1. My disclaimer is Jaromir wrote all of this code, so he may be able to correct my explanations or provide more detail. But basically these settings control the way the initial state vector and MSE matrix are created.
- With 'stochastic' the MSE is based on model asymptotics where possible. If you take the transition equation and multiply it by itself then you get an equation which implies some steady state variance-covariance matrix for stationary variables and this is used to initialize the MSE matrix. The mean is the unconditional mean of the model. (Obviously these concepts are not a well-defined concept for unit root processes.) This is how the initial conditions are created for most of Chapter 3 of Harvey.
- With 'fixed' the MSE matrix is zeros (complete certainty) and the initial condition is the asymptotic mean (where possible) and zero (for unit root processes).
- With 'optimal' the initial conditions are treated as parameters to be estimated. These can be concentrated out of the likelihood, however, and estimated conditional on the parameter vector. See the discussion on Rosenberg's algorithm in Chapter 3 of Harvey (I think).
2. Yeah, well, sort of. You can simply not specify priors (or specify flat priors) for the things you were estimating by MLE. But anytime you are using priors in a joint estimation procedure I guess you are technically using Bayesian methods (the priors on one parameter may affect the estimates of another).
It's not really necessary to constrain the parameters. I think I was just doing that because I was starting to use the particle swarm to find initial conditions and when the parameter space is compact the bounds are used to initialize the first population.
3. Really? I thought the final estimates in the paper were all between 0 and 1 in absolute value. In this case the constraints should not affect the solution. Did you compare the likelihood value you obtained to the one corresponding to the parameter estimates in the paper?
4. Both particle swarms and genetic algorithms tend to work well on highly non-linear optimization problems with lots of local minima. The algorithms are stochastic and are designed to be willing to make enough mistakes (i.e., uphill steps) to find a more global optimum. So I use these algorithms a lot to find initial conditions for optimization problems. It's not really necessary in this case, obviously, because there are other ways of obtaining initial conditions which are probably more efficient. But I just wanted to demonstrate that it can be useful in certain cases. It could probably work in the yields-macro model as well, but would require a larger population and/or more generations and the computer I have at the moment is pretty weak. But there are no guarantees with any stochastic optimization routine.
I wrote a little summary of my perspective of the usefulness of swarm algorithms in a tutorial for IRIS. It's pretty chatty and non-technical but I think it gives the gist of how to use the algorithms. Unfortunately Jaromir is changing the downloads section right now so the tutorials have disappeared. I've attached it. Note that you may need to re-run read_model.m in order to get things to work because the model class definition has changed since the tutorial was created.
Best,
Michael