Hi folks, I have a question about orthogonal polynomials. Any comment and hint will be greatly appreciated! Thanks in advance! I have a project that needs polynomial terms when building a GLM (proc genmod). I have several continuous variables that I want to put into the model using orthogonal polynomials. While I checked the SAS online documentation and found the only way to build orthogonal polynomial is using orpol function in proc iml. The difficulty is that my data set has around 7 million observations and I am afraid it will be slow in proc iml: apply the orpol function to the variables one by one and append the orthogonal polynomials to the original data set then run the model as a regular regression. My question is: Does anyone of you know if there is any method I can do orthogonal polynomials in proc genmod or in data steps? I checked some references listed on the SAS documentation and did not find a quick way to implement the algorithms mentioned in the papers. If you could give me some hint on this, I would highly appreciate it! Another question is: after using orpol function, should I put the constant term in the model too? How to put a constant in a regression model? Like the first column in the below: proc iml; x = T(do(-1,1,0.2)); P=orpol(x,2); print P; quit; 0.3015113 -0.476731 0.5120916 0.3015113 -0.381385 0.2048366 0.3015113 -0.286039 -0.034139 0.3015113 -0.190693 -0.204837 0.3015113 -0.095346 -0.307255 0.3015113 -4.21E-18 -0.341394 0.3015113 0.0953463 -0.307255 0.3015113 0.1906925 -0.204837 0.3015113 0.2860388 -0.034139 0.3015113 0.381385 0.2048366 0.3015113 0.4767313 0.5120916 Thanks, Wei
... View more