BookmarkSubscribeRSS Feed
qkaiwei
Calcite | Level 5

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!

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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;


qkaiwei
Calcite | Level 5

Thanks.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 1154 views
  • 0 likes
  • 2 in conversation