WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS
FUNCTION?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sai
Lag function can be used if you want to perform
computations across the observations.
Is This Answer Correct ? | 0 Yes | 0 No |
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
what is Enterprise Guide?what is the use of it?
"What is the difference between proc sort nodup and proc sort nodupkey?"
I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a different functionality. In my program I use bot these data sets. How do I specify which Age variable I want to use?
What is the command used to find missing values?
What is proc sort?
In the flow of DATA step processing, what is the first action in a typical DATA Step?
What is the difference between SAS Data step and SAS PROC SQL, and which is better?
WHAT DIFFERRENCE DID YOU FIND AMONG VERSION 6 8 AND 9 OF SAS.
Have you ever linked SAS code? If so, describe the link and any required statements used to either process the code or the step itself.
In the following DATA step, what is needed for ‘fraction’ to print to the log? data _null_; x=1/3; if x=.3333 then put ‘fraction’; run;
We have a string like this "kannafromsalembut" ,from this i want to get only "fromsal" (but one condition with out using substring function)here we can not use scan because in the given string there is no delimeter? so give ans without out using substring ?