Last observation carried forward?
Looks like you are having a wide table, for example, ‘a012’, in which 1 denoted as variable and 2 as second week?
Very interesting. I thought except for the last value as the worst case, otherwise it is very risky to carry it forward.
LOCF中文名称末次观测转结法,即若有数据缺失,则用该次观测前最后一次有效观测的数据对该数据进行填补(也可进行其他补充规定)。我一般是用向上填补过程实现的,
proc sort;by xx xx xx ;run;
data b;set a;
do i=1 to n;
l_x=lag(x);
l_y=lag(y);
if x=. and x=l_x then y=l_y;
end;
drop l_x l_y ;
run;