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 Proc glm does?
Mention sas system options to debug sas macros.
How to specify variables to be processed by the freq procedure?
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
What is the difference between reading data from an external file and reading data from an existing data set?
What do the put and input function do?
How can sas program be validated?
what are input dataset and output dataset options? : Sas programming
Describe a time when you were really stuck on a problem and how you solved it?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
How do you debug and test your SAS programs?
What versions of SAS have you used (on which platforms)?
What is the difference between the proc sql and data step?
Mention the category in which sas informats are placed?
Explain input and put function?