Skip to Content
0
Former Member
Jul 07, 2012 at 05:39 AM

Execute Linear regression using Macro's

24 Views

Hi APO Guru's,

I am trying to simulate Linear regression using macros , and i have come across the below 2 macro functions which could be used for linear regression.

TREND() = TREND( X1 ; ... ; Xn ; Y1 ; ... ; Yn ) returns the trend B in a linear regression line Y = A + BX for a series of observed pairs of values

CONSTANT() = CONSTANT( X1 ; ... ; Xn ; Y1 ; ... ; Yn ) returns the constant A of a linear regression line Y = A + BX

But i am not quite sure how to make use of these macros to good use , without the help of forecasting profiles.

My condition is as given below :

Sales data is at week level , I would like to Execute linear regression macros in Month Data View.
Such that the Spike in week sales are eliminated

Please advise
Anish