Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

polynomial terms in proc logistic and other regressions

Tags:

sas

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.

like image 404
djacky Avatar asked Nov 15 '22 05:11

djacky


1 Answers

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;
like image 97
cmjohns Avatar answered Dec 22 '22 22:12

cmjohns