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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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