Date: Mon, 2 Apr 2001 04:49:16 -0400 Philip Whittall "SAS(r) Discussion" Philip Whittall Re: Why Pro Prinqual requires the variables to be numeric?

Dear Paula,

With categorical data PRINQUAL first assigns numbers to the categories (in the manner of levels in a design matrix) and then scales these in order to maximise the criterion you've chosen (usually % variance explained). So you have to specify the OPSCORE transformation with categorical data. The example below shows how it works ...

data a; input c \$ n1 n2; datalines; A 3 8 B 2 7 C 1 6 D 4 9 A 10 18 B 9 17 C 8 16 D 11 19 ; PROC PRINQUAL N=1 OUT=B; TRANSFORM OPSCORE(C) IDENTITY(N1 N2); RUN; PROC PRINT DATA=B; RUN;

The procedure starts by assigning scores 0,1,2,3 to A,B,C,D and then iterates until the scores are, in round numbers, 2,1,0,3 which ranks them in the order C,B,A,D which maximises the correlation with N1 and N2.

Philip

On Mon, 2 Apr 2001 04:53:01 GMT, PD <sophe@USA.NET> wrote:

>To those who are familiar with Proc prinqual in SAS statistics, > >I have five categorical variables that I need to use Proc prinqual to score >them before I can use their scores to apply proc princomp. They all have >values such as G, A, B, C and so on. > >When I specify them at the Transform statement, SAS said they need to be >numeric. SAS Doc clearly says that proc prinqual can process nominal >categories as well as ordinal ones. I don't know why my original variables >have to be converted to 1,2, 3 and so on to represent A, B, C. That gives me >impression that Proc prinqual only scores ordinals. May be one Option value >I am not aware of that can just tell SAS to accept the character values. >What makes me uneasy is if I have to convert them to numeric, I can only >assign arbitrary values to them. Does that affect results? Since SAS does >not get to see the original values, A=2 is as valide as A=9. > >Any tip will be greately appreciated. Thank you. > >Paula D X

Back to: Top of message | Previous page | Main SAS-L page