Hello everyone, I have this initial table :
DATA temp;
input id trt $ start end;
cards;
1 A 2000 2004
1 B 2002 2006
run;
Schema :
2000 2001 2002 2003 2004 2005 2006
A |-----------|-----------|-----------|-----------|
B |------------|-----------|------------|------------|
I was wondering how to recreate treatment sequences according to years. More clearly i would like to obtain this database :
DATA result;
input id trt $ start end;
cards;
1 A 2000 2002
1 A-B 2002 2004
1 B 2004 2006
run;
Schema :
2000 2001 2002 2003 2004 2005 2006
A |-----------|-----------|
A-B |-----------|-----------|
B |------------|------------|
Does anyone have an idea to solve this case ? Thanks in advance.
... View more