```Date: Thu, 8 Nov 2007 22:51:05 -0500 Reply-To: Kwame Asom Sender: "SAS(r) Discussion" From: Kwame Asom Subject: Using Legendre Polynomials in SAS Content-Type: text/plain; charset=ISO-8859-1 Hi everybody, I have used SAS to fit a quadratic regression, regressing weight (kg) on age in days of animals, using ORDINARY POLYNOMIALS. The summary of the model used is: weight = age * age ie. age x age (quadratic regression). For cubic regression it would be: weight = age *age * age, for quartic regression it would be age*age*age*age. Supposing the age is 60 days and the weight is 100kg, a quadratic regression using ordinary polynomials would be: 100 kg = 60x60. Now, I want to use SAS to fit 3rd order (ie. quadratic) LEGENDRE POLYNOMIAL,regressing weight on age. How do I achieve that,please? As illustrated above, using ordinary polynomials in SAS is quite easy,but I DONT KNOW HOW TO REGRESS WEIGHT ON AGE USING LEGENDRE POLYNOMIALS.Here is a brief discription of Legendre polynomials. Legendre polynomials are denoted by Pn (x) of order n. The polynomials are either even or odd functions of x for even or odd orders n. The first few Legendre polynomials are Legendre polynomials are denoted by Pn (x) of order n. The polynomials are either even or odd functions of x for even or odd orders n. The first few Legendre polynomials are Po (x) =1 P1(x) = x P2(x) = ½(3x2 -1) P3 (x) = ½(5x3 -3x) PLEASE HELP ME TO USE SAS TO CODE LEGENDRE POLYNOMIALS. Thanks in advance. K. Asom ```

Back to: Top of message | Previous page | Main SAS-L page