I have this data set here were the first x is sales, x2=profits, and x3=assets. Measurements are in millions of dollars.
Company X1 X2 X3
General Motors 126,974 4,224 173,297
Ford 96,933 3,835 160,893
Exxon 86,656 3,510 83,219
IBM 63,438 3,758 77,734
General Electric 55,264 3,939 128,344
Mobil 50,976 1,809 39,080
Philip Morris 39,069 2,946 38,528
Chrysler 36,156 359 51,038
Du Pont 35,209 2,480 34,715
I need to import the data manually and then I am asked to manually find correlation matrix using only matrix manipulation. I assume I somehow I use proc IML. If so, I'd have to create 3 matrices, correct? I don't know where to start.
@trash wrote:I have this data set here were the first x is sales, x2=profits, and x3=assets. Measurements are in millions of dollars.
Company X1 X2 X3
General Motors 126,974 4,224 173,297
Ford 96,933 3,835 160,893
Exxon 86,656 3,510 83,219
IBM 63,438 3,758 77,734
General Electric 55,264 3,939 128,344
Mobil 50,976 1,809 39,080
Philip Morris 39,069 2,946 38,528
Chrysler 36,156 359 51,038
Du Pont 35,209 2,480 34,715
I need to import the data manually and then I am asked to manually find correlation matrix using only matrix manipulation. I assume I somehow I use proc IML. If so, I'd have to create 3 matrices, correct? I don't know where to start.
See the article "Compute covariance and correlation matrices," which shows the four steps that you need to perform to compute a correlation matrix from a data matrix. In particular, you do not need to form three matrices. The three variables become three columns in a single data matrix.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.