%macro mod(sta,last,dept);
proc reg data=reg.pd_merge;
%do i1=&sta %to (&last);
%do i2=(&i1+1) %to (&last);
%do i3=(&i2+1) %to &last;
%do i4=(&i3+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4;
%do i5=(&i4+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5;
%do i6=(&i5+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5 x&i6;
%do i7=(&i6+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5 x&i6 x&i7;
%do i8=(&i7+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5 x&i6 x&i7 x&i8;
%do i9=(&i8+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5 x&i6 x&i7 x&i8 x&i9;
%do i10=(&i9+1) %to &last;
model &dept=x&i1 x&i2 x&i3 x&i4 x&i5 x&i6 x&i7 x&i8 x&i9 x&i10;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
%end;
ods output ParameterEstimates=reg.a(drop= DF StdErr tValue) fitstatistics=reg.b(keep=model cValue2) anova=reg.c(keep= model ProbF);
run;
%mend mod;
%mod(1,17,ZF投资类);
相当于跑了一堆回归 输出里头model1到999都没问题 可是之后的model***了 这样我没法把三个表通过model合并到一块
希望大神能帮忙解答 感谢