Interview Questions   Tutorials   Discussions   Programs   Videos   

SAS - What is LAG function? Where can you implement this function?




280
views
asked mar September 20, 2014 06:29 AM  

What is LAG function? Where can you implement this function?


           

1 Answers



 
answered By vishnoiprem   0  

Lag() function returns the value of the first previous observation in a time series. It could be used in Auto Regression analysis for time series.

For example, Let OBs be the cloumn name for the original time series, the analysis for AR(2) could be:

data test;
set test;
m = lag(OBS);
n = lag(m);
run;
proc reg data = test;
model y = m n;
run; 
flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  Question tags

sas × 1

Asked 2 years and 3 months ago ago
Number of Views -280
Number of Answers -1
Last updated
3 years and 2 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert