September 2019
Beginner to intermediate
346 pages
7h 35m
English
If you want to calculate a period of time between one event and another, then you should use the LAG function. This function helps to return values from a queue. The syntax has two elements:
Let's look at lagging the variables:
Data Lag;Set Decimal (Keep = Round);Lag1 = Lag1 (Round);Lag2 = Lag2 (Round);Run;
This will result in the following output:

By specifying a single lag, we have started the LAG1 variable values from the second observation. The first observation has ...
Read now
Unlock full access