# Developing Markov Transition Matrix

I would like to build a transition matrix based on some tabular data given that:

• I have about 50,000 historical data points
• Data is organized in a way such as road_id, age, condition
• There are 10 condition levels (1 to 10)
• The Transition Matrix will be condition vs. condition. Roads are assumed to deteriorate based on their current condition and not on any historical data. i.e. if currently the road is in condition 5, it can either stay at 5 or go to 6. Whatever happened in the past is of no effect.
• Age is the "known" variable as in it's the only variable that is "actual" for all the data. Condition is either calculated, assumed, or observed based on video, calculations, local knowledge, etc.
• the TPM is of the following structure:

$$\begin{bmatrix} a & b & 0 & 0 & ... & 0 \\ 0 & c & d & 0 & ... & 0 \\ ... & ... & ... & ... & ... & ... \\ 0 & 0 & 0 & 0 & ... & 1 \end{bmatrix}$$

• The reason that the last Pnn = 1 is that a road can't get any worse once it reaches that stage.

Data Sample:

$$\begin{array}{lr} \text{age} & \text{condition} \\ \hline 0 & 1.18 \\ 0 & 1.18 \\ 30 & 9.87 \\ 13 & 4.97 \\ 26 & 8.30 \\ 19 & 6.50 \\ 11 & 3.82 \\ 9 & 2.68 \\ 6 & 1.49 \\ 9 & 2.68 \\ 16 & 6.22 \\ \end{array}$$

What is the correct way to calculate my Transition Matrix?

The transition matrix shall be used to:

• Estimate and forecast road conditions in the future whether as a whole or for a unique road. For example, what's the average condition of roads of type A or what's the condition of road R001 now and what will its condition be in 10 years?
• I currently use a mixed integer program to solve this but I'm toying around with probabilistic models.
• How are the "10 condition levels" related to the numerical values in the "condition" column in your data sample? – whuber Feb 3 '15 at 19:18
• @whuber, 0-1, 1-2, 2-3, 3-4, 4-5, 5-6, 6-7, 7-8, 8-9, 9-10 – dassouki Feb 3 '15 at 19:19

## 1 Answer

I'll give you this reference to a mortgage delinquency transition model: Grimshaw, Scott D., and William P. Alexander. "Markov chain models for delinquency: Transition matrix estimation and forecasting." Applied Stochastic Models in Business and Industry 27.3 (2011): 267-279.

Mortgages go from current to a couple of terminal states: Full Pay-Off and Default. Payoff can happen from any state, at this point the mortgage is fully paid. Defaults happen gradually (usually), i.e. you go 30 day delinquent, then 60 etc. Sometimes, though you may default at once.

What is similar to yours is that delinquency transitions are usually gradual to: 30-60-90...Default. In theory you can't jump from 30 to 90, but due to data errors this happens in the dataset. You have only one terminal state: 1.

Take a look at how the build the markov transition model.

• the link is dead – Rilcon42 Dec 2 '15 at 3:45
• @Rilcon42, fixed it – Aksakal Dec 2 '15 at 15:06