What is LAG function?How is it used? can any one explain
Answer Posted / naveen
this Question was raised by saddi soorath....
lag function enables you to have the previous value.
we have the following data
Name num
Naveen 1
Naveen 2
Basha 1
Basha 2
so in data step
if u give num1 =lag(num) you will have the following result
Name num num1
Naveen 1 .
Naveen 2 1
Basha 1 .
Basha 2 1
Thanks and regards
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the difference between reading data from an external file and reading data from an existing data set?
Given an unsorted data set, how to read the last observation to a new data set?
explain about sas business intelligence? : Sas-bi
what does the run statement do? : Sas programming
What does PROC print, and PROC contents do?
Describe the function and utility of the most difficult SAS macro that you have written?
Give e an example of..
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
How many data types are there in SAS?
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
describe how to adjust the performance of data integrator? : Sas-di
Tell e how how dealt with..
What do the SAS log messages "numeric values have been converted to character" mean?
how to do user inputs and command line arguments in sas?
for what purpose would you use the retain statement? : Sas programming