I wonder if there is a way of finding the last date that has a non-na observation for all the series in a workfile (or group).
At the moment this can be achieved by the following convoluted commands:
Code: Select all
group g *
series tracklast=@recode(@rnas(g)=0,na,@rnas(g))
!lastv=@ifirst(tracklast)-1
%last_dt=@otod(!lastv)
smpl {%last_dt} {%last_dt}
Thanks,
Javier
