有谁知道如何将参数估计和变量作为数据集(列)而不是sas报告。
我尝试在我的代码中使用输出语句,但无法在列中获取参数估计和变量名称。这是我的代码:
PROC REG DATA=WORK.SORTTempTableSorted
PLOTS(ONLY)=ALL
;
Linear_Regression_Model: MODEL logsnit = Global Government Healthcare "Basic Materials"n "Consumer Goods"n "Consumer Services"n Energy Financials Industrials Technology "Telecommunications Services"n Utilities Asia Europe Japan "Lat.Amer"n "Africa & Middle East"n AustralAsia "N.Amer"n A AA AAA B BB BBB CCC Senior Sub
/ SELECTION=NONE
NOINT
PCORR1 PCORR2
;
Restrict Government+Healthcare+"Basic Materials"n+"Consumer Goods"n+"Consumer Services"n+Energy+Financials+Industrials+Technology+"Telecommunications Services"n+Utilities=0;
Restrict Asia+Europe+Japan+"Lat.Amer"n+"Africa & Middle East"n+AustralAsia+"N.Amer"n=0;
Restrict A+AA+AAA+B+BB+BBB+CCC=0;
Restrict Senior+Sub=0
;
RUN;
Output out=work.test
/*COOKD, COVRATIO, DFFITS, H, L95, L95M, LCL, LCLM, OUT, P, PRED,
PREDICTED, PRESS, R, RESIDUAL, RSTUDENT, STDI, STDP, STDR, STUDENT, U95, U95M, UCL, UCLM*/;
QUIT;
答案 0 :(得分:1)
我远离SAS,但您可以看到的所有输出都可以保存为数据集。您可以在此处看到SAS在proc reg中创建的表名:
所以添加(在run语句之前的某个地方):
ods输出ParameterEstimates = YourName;
你应该得到你想要的东西。