Statistical programming, matrix languages, and more

How to solve the equation?

Reply
Contributor
Posts: 47

How to solve the equation?

Hi all:

    I have an equation, w*P=w, w means a 1*3 row vector, with unknown elements, but sum of all element is 1, P means a known 3*3 matrix, so how to calculate the w by iml?

   thanks!

SAS Super FREQ
Posts: 3,620

Re: How to solve the equation?

I hope P` has an eigenvalue of 1.

If so, then w is the eigenvector associated with that eigenvalue:

proc iml;

P = {1.2714 -.1227 0.7243,

     -.1227 0.9496 0.0911,

     0.7243 0.0911 1.2790};

call eigen(val, vec, P`);

print val vec;

w = vec[,2]; /* second column is eigenvector for 1 */

check = w`*P - w`;

print check;


Contributor
Posts: 47

Re: How to solve the equation?

Thanks.

Ask a Question
Discussion stats
  • 2 replies
  • 281 views
  • 0 likes
  • 2 in conversation