# Transition Probability Estimation

I'm try to estimate a simple stationary Markov chain in Shazam using least squares. The restrictions appear to be causing some problems though since all the pij>=0 and sum over j pij=1 for all i where pij are the probabilities to be estimated and are the probability of transitioning from the ith to the jth state in the chain. This should be a simple problem?

edit retag close merge delete

Please can you post the code you are attempting to run. Solving this should be simple but to assist we would need to see the command script.

( 2012-06-08 10:54:04 +0000 )edit

Sort by » oldest newest most voted

Actually this depends on the form of the model, the nature of the noise and such so not an immediately simple problem. Coding in SHAZAM is easy once you know these things.Can you give more detail, sample code you are attempting...? etc?

more

Andrew is quite correct for general Markov models however in this case the problem can be solved by specifying the form of the equation on the NL command substituting the non-negativity and sum to unit restrictions directly into the specification of the equation on the EQ line. This can be specified as follows:

nl 1 / ncoef=3
eq y = a + (b*b)*x + (c*c*)z + (1-b*b-c*c)*w


The variables are y x z w and the coefficients are a b c.

The application of restricted least squares to solve this problem was first described in Lee, Judge and Zellner (1970) and produces consistent but not efficient estimates. Another method is by iterative GLS (see MacCrae 1977) designed to improve efficiency - also possible within SHAZAM.

Note also the example for solving Non-Negative least squares which also makes use of the NL command in a similar way.

However, an alternative approach (also proposed by Lee et al) is to treat this as a Quadratic Programming problem and you may then solve this using the QP command in SHAZAM (version 11 or later).

more