BookmarkSubscribeRSS Feed
ksmielitz
Quartz | Level 8

I have two factors for which I would like to create factor scores, but when I load them into the same PROC SCORE my factors get all messed up. This works great:

 

proc factor data=dissert score outstat=factout nfactors=1
		method=prin rotate=varimax score;
	var open likelyafs ;
run;

proc score data=dissert score=factout out=fscore
	(rename= (factor1=bankincl ));
	var open likelyafs ;
run;

However, when I add to it like this: 

proc factor data=dissert score outstat=factout nfactors=2
		method=prin rotate=varimax score;
	var open likelyafs moninc highested pared ;
run;

proc score data=dissert score=factout out=fscore
	(rename= (factor1=bankincl factor2=SESFS));
	var open likelyafs moninc highested pared;
run;

My factor loadings get all messed up. 

 

When run separately, open and likelyafs load beautifully together (.7-.8) and when I load moninc, highested, and pared together they load as expected also.

 

BUT, when I try and the score procedures separately, they won't run. I keep getting errors--Variable BANKINCL not found and Variable SESFS not found.

 

Is there a way to do this or am I SOL? Thanks in advance.

4 REPLIES 4
Reeza
Super User

It's not clear what's going on here at all. Can you use SASHELP.CARS and replicate your issue and clearly identify where you're having problems?

ksmielitz
Quartz | Level 8

I'm sorry, @Reeza...what is SASHELP.CARS? I can't find it.

Reeza
Super User

It's a SAS data set in the library SASHELP with the name CARS. 

 

So rather than use your data, which we can't see or have, anyone can use the data sets in SASHELP to create reproducible code that anyone can run and test.

ksmielitz
Quartz | Level 8

@Reeza Thanks for the explanation! I'll see if I can check it out and put that to work to get some additional help!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1390 views
  • 1 like
  • 2 in conversation