WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS
FUNCTION?
Answer Posted / zyin2
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 y be the cloumn name for the original time
series, the analysis for AR(2) could be:
data test;
set test;
m = lag(y);
n = lag(m);
run;
proc reg data = test;
model y = m n;
run;
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is maximum number of rows and cols can be handled in SAS?
what is data access? : Sas-di
What would be the value of month at the end of data step execution and how many observations would be there?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
What are the data types that sas contain?
Which date function advances a date, time or datetime value by a given interval?
What are the limitations for memory allocation for SAS variables
Why double trailing @@ is used in input statement?
how are numeric and character missing values represented internally? : Sas programming
what is the use of sas management console? : Sas-di
Explain what is the use of proc gplot?
What is program data vector (pdv) and what are its functions?
How sas treats the dsd delimiters?
How long can a macro variable be? A token? : sas-macro
what are the best practices to process the large data sets in sas programming? : Sas-administrator