Proc Score scores a dataset using parameters from Proc Reg and provides you with a final estimate on the dependent variable. Is there a way to get the intermediate results? That is, can you get an X*Beta matrix with BY statement functionality without hand coding the multiplication? I have large confidential data, so the following fake data is provided as an example. Consider a model estimating a bank's return on investment (ROI) as a function of the time the account has been open, the balance in the account, and the average times the customer visits a branch each month: DATA WORK.TESTFILE; INFILE DATALINES DLM=','; INPUT MBR_NO ACCT_TYPE $ ROI YEARS_OPEN BALANCE VISIT_PER_MO ; DATALINES; 01,C,0.515,5,11885,1 02,C,0.964,6,6023,0 03,S,0.735,2,9078,3 04,S,0.504,1,181,4 05,C,0.653,2,805,10 06,C,0.698,7,8321,4 07,S,0.108,6,3634,0 08,C,0.952,5,6500,7 09,C,0.309,1,7680,2 10,C,0.221,2,6969,2 11,C,0.352,13,8218,6 12,C,0.440,2,19995,1 13,S,0.782,4,1301,5 14,S,0.004,11,12871,3 15,C,0.525,8,12168,0 16,C,0.119,11,17187,4 17,S,0.169,7,6931,11 18,C,0.261,1,21894,7 19,C,0.406,2,6236,2 20,C,0.403,14,13017,1 ; RUN; PROC SORT DATA=WORK.TESTFILE; BY ACCT_TYPE; RUN; PROC REG DATA=WORK.TESTFILE OUTEST=WORK.TESTPARMS; BY ACCT_TYPE ; MODEL ROI = YEARS_OPEN BALANCE VISIT_PER_MO; RUN; PROC SCORE DATA=WORK.TESTFILE SCORE=WORK.TESTPARMS TYPE=PARMS; BY ACCT_TYPE; VAR ROI YEARS_OPEN BALANCE VISIT_PER_MO; RUN; The parameter for Visits_Per_Mo where Acct_Type = 'C' is -0.00242. I'm seeking a matrix where Visit_Per_Mo = 0 for Mbr_No = 15, -0.00242 for Mbr_No = 20, -0.00484 for Mbr_No = 9, etc. I'm not seeing anything in the documentation that will allow me to achieve this with Proc Score. Is there another procedure that will achieve the same thing? The dataset and number of variables in my actual dataset are large, so hand-coding the multiplication would prove time-consuming.
... View more