5

I'd like to do the following regression

proc logistic data=abc
    model y = x x*x x*x*x ....;
run;

Is there a shorthand to generate these polynomial terms? Thanks.

Triad sou.
  • 2,969
  • 3
  • 23
  • 27
djacky
  • 51
  • 1

1 Answers1

1

Edit: That will teach me to look closer at the question before I answer. The BAR operator is indeed for interaction - not polynomial effects.

Logistic does not have shorthand to accomplish this yet that I know of - but glimmix does have an experimental technique using the effect statement. For example, this..

effect MyPoly = polynomial(x1-x3/degree=2);
       model y = MyPoly;

is the same as

model y = x1 x2 x3 x1*x1 x1*x2 x1*x3 x2*x2 x2*x3 x3*x3;
cmjohns
  • 4,465
  • 17
  • 21