Hello, I'd very much appreciate a certain amount of help with this. This is my current data: data WORK.HAVE; infile datalines dsd truncover; input Thing:32. Day:32.; datalines; 0 1 0 4 0 11 0 14 0 19 0 28 0 35 0 41 1 48 1 55 ;;;; I want to create an Early_Warning dummy Variable that will take the value of 1, if Thing is happening with the next 30 days. So in this case this is what the result should look like: data WORK.WANT; infile datalines dsd truncover; input Thing:32. Day:32. Early_Warning:32.; datalines; 0 1 0 0 4 0 0 11 0 0 14 0 0 19 1 0 28 1 0 35 1 0 41 1 1 48 1 1 55 1 ;;;; Lastly, if we can't be sure whether Thing is happening within the next 30 days, I want the Early_Warning to be null and the data should look like this. data WORK.WANT2; infile datalines dsd truncover; input Thing:32. Day:32. Early_Warning:32.; datalines; 0 1 0 0 4 0 0 11 0 0 14 0 0 19 0 0 28 . 0 35 . 0 41 . 0 48 . 0 55 . ;;;;
... View more