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 use of %include statement?
what are all the reports you generated in your recent project?
Tell e how how dealt with..
How is character variable converted into numeric variable and vice versa?
What is the difference between SAS functions and procedures?
what r the job openings SAS for fresher graduates !
Why and when do you use proc sql?
What was the last computer book you purchased? Why?
Mention what is the difference between nodupkey and nodup options?
What are the special input delimiters used in SAS?
what are some good sas programming practices for processing very large data sets? : Sas programming
What is the length assigned to the target variable by the scan function?
Difference between nodup and nodupkey options?
how can you create zero observation dataset? : Sas programming
what is the function of catx syntax? : Sas-administrator