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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 831 views
  • 0 likes
  • 2 in conversation