Hi all, I'm a sas beginner struggling quite a bit with retain. I have daily data where when a specific condition is met, I want to preserve that value for the subsequent two days, so in essence create the following value_lagged variable. Date Condition Value Value_lagged 1/1/2005 1 5 0 1/2/2005 0 0 5 1/3/2005 0 0 5 1/4/2005 0 2 0 1/5/2005 0 3 0 1/6/2005 0 0 0
... View more