Long run distribution

mh03

New Member
I have been worked out a transition matrix of a Markov chain using the Metropolis algorithm, and now have to use R in order to show that it has the required long
run distribution. I am new to R so im not sure if this is on the right track:

> A= matrix(c(.75, .6, .5, .1, .1, .1, .15, .3, .4), nrow=3, ncol=3)
> A
[,1] [,2] [,3]
[1,] 0.75 0.1 0.15
[2,] 0.60 0.1 0.30
[3,] 0.50 0.1 0.40

> trans.mat <- A

> trans.mat %*% trans.mat
[,1] [,2] [,3]
[1,] 0.6975 0.1 0.2025
[2,] 0.6600 0.1 0.2400
[3,] 0.6350 0.1 0.2650

> trans.mat %*% trans.mat %*% trans.mat
[,1] [,2] [,3]
[1,] 0.684375 0.1 0.215625
[2,] 0.675000 0.1 0.225000
[3,] 0.668750 0.1 0.231250
.
.
.
> trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat
[,1] [,2] [,3]
[1,] 0.6800001 0.1 0.2199999
[2,] 0.6799999 0.1 0.2200001
[3,] 0.6799998 0.1 0.2200002

> trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat %*% trans.mat
[,1] [,2] [,3]
[1,] 0.68 0.1 0.22
[2,] 0.68 0.1 0.22
[3,] 0.68 0.1 0.22

Does this seem correct, or is there some shorter way to get to this point?

Any help would be much appreciated.