Hello Everyone!
I am trying to create a wealth index using the eigenvectors obtained from a principal component analysis and multiple other variables. My data looks like this
Dataset 1: Dataset 2:
Prin1 ID V1 V2 V3 V4 V5 V6 V7 ....(other variables that are not related but I need to keep)
.23 1
.43 2
.62 3
.12 4
.09 5
.67 6
.82 7
I would like to calculate INDEX=0.23(V1)+.43(V2)+.62(V3)+.12(V4)+.09(V5)+67(V6)+.82(V7)
So I would like to multiply the first observation of dataset 1 by the entire column V1 of dataset 2 and repeat this for all the observations in dataset 1.
This is known as scoring a data set. Look at PROC SCORE and I believe the example section has one specifically on using Factors /principal components/eigenvectors.
@smcelroy wrote:
Hello Everyone!
I am trying to create a wealth index using the eigenvectors obtained from a principal component analysis and multiple other variables. My data looks like this
Dataset 1: Dataset 2:
Prin1 ID V1 V2 V3 V4 V5 V6 V7 ....(other variables that are not related but I need to keep)
.23 1
.43 2
.62 3
.12 4
.09 5
.67 6
.82 7
I would like to calculate INDEX=0.23(V1)+.43(V2)+.62(V3)+.12(V4)+.09(V5)+67(V6)+.82(V7)
So I would like to multiply the first observation of dataset 1 by the entire column V1 of dataset 2 and repeat this for all the observations in dataset 1.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.