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 |
What is the difference between an informat and a format? Name three informats or formats.
Which of the following is not created during compilation phase?
How to display duplicate observations in data?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
What do the sas log messages “numeric values have been converted to character” mean? What are the implications?
How to write duplicate records into a separate dataset using sort?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
it will become easy if uuu provide website linkssss and list of consultanciessssss
Name types of category in which SAS Informats are placed?
What does a PROC TRANSPOSE do?
how does sas handle missing values in assignment statements? : Sas programming
i have a null dataset with 20 variables. i want to upload the variables which contain name like a or k or anything in another dataset.how can we create the dataset?