我有以下表格:
模型表
Model State FH
NEW-20 1 279
NEW-20 2 279
NEW-20 3 204
NEW-20 4 186
NEW-21 1 333
SA表
Driver Year Scenario;
GDP 2013 Nominal
Fuel 2013 Nominal
Mili 2013 Nominal
GDP 2014 Nominal
Fuel 2014 Nominal
Mili 2014 Nominal
GDP 2015 Nominal
Fuel 2015 Nominal
尿路感染表
Driver Scenario State var1 var2 var3 var4 var5 var6;
GDP Nominal 1 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
GDP Strong_G 2 10.0% 12.0% 7.5% 10.0% 10.0% 0.0%
GDP Mild_D 4 -5.0% -8.0% -4.0% -10.0% -8.0% -2.5%
Mil Strong_D 1 -6.0% -10.0% -6.0% -12.0% -10.0% -5.0%
MIL Nominal 1 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
我想使用条件 IF 语句。什么是正确的语法?这是我想做的一个想法:
(IF Model.State & SA.Driver (GDP) & SA.Scenario = UTI.Driver & UTI.Scenario & UTI.State
THEN SUMPRODUCT((1+(UTI.VAR1--VAR6));MODEL.FH)
+
IF Model.State & SA.Driver(Fuel) & SA.Scenario = UTI.Driver & UTI.Scenario & UTI.State
THEN SUMPRODUCT((1+(UTI.VAR1--VAR6));MODEL.FH)
+
IF Model.State & SA.Driver(Mil) & SA.Scenario = UTI.Driver & UTI.Scenario & UTI.State
THEN SUMPRODUCT((1+(UTI.VAR1--VAR6));MODEL.FH))
AS TOTAL
我怎样才能在 SAS 中做到这一点?