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 data governance? : Sas-di
For what purpose would you use the RETAIN statement?
what are some differences between proc summary and proc means? : Sas programming
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
What is the difference between where and if statement?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
how sas deals with business intelligence? : Sas-bi
what are the considerations when picking a SAS/STAT procedure?
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
what do the pad and dim functions do? : Sas programming
Tell e how how dealt with..
for report generation which one you used proc report or data_null_?
What is maximum number of rows and cols can be handled in SAS?