function lx = lag(x,k) 

lx = x(1:end-k);

lx = [NaN*zeros([k, 1]) ; lx];

return