Thank you very much for your answer ! My english isn't really good and I'm a bit lost so I'm happy you understood my pb :). It was exactly what I expected : I need a backward windows. Unfortunately I didn't solve my problem yet : M data is like : Proc iml;
X = {1, 2, 3, 4, 5, 6];
Y = {2, 3, 4 ,5, 6, 7}; I'm using you're SAS code : k = 3;
do i = k to nrow(X);
idx = (i-k+1):i;
Xa = X[idx];
Ya = Y[idx]; That souds perfect. But when I try to calculate my 4 differents Beta I have a new pb : The B without any loop is like that : B=inv(t(X)*X)*t(X)*Y; But in my case I need to use Xa and Ya and I need to have a vector of 4 different beta. Do you know how to do that ? Thank you so much for your help
... View more