SAS code Syntax error-pairwise F-tests for fixed effects under GLM

30 Views Asked by At

I want to run pairwise F-tests for fixed effects (including industry effect, year effect, and the interaction effect of industry and year) under GLM. However, there seems to be a bug, and it appears that there might be a syntax error. I'm not sure how to modify the syntax. Could you assist in debugging?

Code:

proc glm data=base7;
        class hsiccd ipoyear;
        model no=D1nonVC D2nonVC D3nonVC D4nonVC D1VC D2VC D3VC D4VC hsiccd ipoyear hsiccdyear/noint solution;
        test D1nonVC=D1VC;
        test D2nonVC=D2VC;
        test D3nonVC=D3VC;
        test D4nonVC=D4VC;
run;

Log:

371  proc glm data=base7;
372          class hsiccd ipoyear;
373          model no=D1nonVC D2nonVC D3nonVC D4nonVC D1VC D2VC D3VC D4VC hsiccd ipoyear hsiccdyear/noint solution;
374          test D1nonVC=D1VC;
                  -------
                  79
                  76
附註: 已刪除前一個陳述式。
375          test D2nonVC=D2VC;
                  -------
                  79
                  76
附註: 已刪除前一個陳述式。
376          test D3nonVC=D3VC;
                  -------
                  79
                  76
附註: 已刪除前一個陳述式。
377          test D4nonVC=D4VC;
                  -------
                  79
                  76
附註: 已刪除前一個陳述式。
ERROR 79-322: Expecting a H.
ERROR 76-322: Syntax error, statement will be ignored.
378  run;

NOTE: Due to the presence of CLASS variables, an intercept is implicitly fitted.  R-Square has been corrected for the mean.

I also used LSMEANS…… for pairwise comparisons in SAS, but I still encountered syntax errors. Please help me correct the syntax.

0

There are 0 best solutions below