SHAZAM Community
Ask Your Question

Transition Probability Estimation

asked 2012-06-08 08:39:34 +0000

Nittany66 gravatar image

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 flag offensive 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.

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

2 answers

Sort by ยป oldest newest most voted

answered 2012-06-18 17:47:35 +0000

Andrew Stein gravatar image

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?

edit flag offensive delete link more

answered 2012-06-22 16:45:15 +0000

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).

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-06-08 08:39:34 +0000

Seen: 736 times

Last updated: Jun 22 '12