我想用sas的proc ga程序步写ga-pls,在自定义函数中用run_macro()运行自定义宏函数,这样在设想中可以同时在proc ga程序步中嵌入其他模型的程序步,当然pls也是。但是,按照网上查的资料写出来的测试程序未返回相关值,提示错误:ERROR: The variable n was referenced but not given a value.ERROR: Compilation error.
ERROR: Execution terminating because of previous errors.
测试的数据集如下:
ga1        ga2        ga3        ga4        ga5
1        1        1        1        1
1        1        1        1        1
1        1        1        1        1
1        1        1        1        1
1        1        1        1        1
测试的宏函数主要是求相加和最小的列变量,即最后的编码组合应是10000(五个数字只有一个是1)。
已经卡在这儿好多天了,也找不到原因,还重感冒中~求大佬翻牌!为什么会出现这个错误?以及接下来我该如何解决?