function [medRho,ICRho,RhoQuantiles]=largestARrootStock91(Y)
 % replication of Stock (1991) by Francesco Corsello

 % load tstats 
load tStatToC_Stock1991 

y=Y(:);
T=length(Y);

[~,~,tStatADF]= adftest(y,'model','ARD');
 

  [~,idtStat]=min(abs(tStatADF-tStatGrid));
 
 id95=[1,9];
 id90=[2,8];
 id80=[3,7];
 id70=[4,6];
 id50=5;
  
cQuantiles=cSplined(idtStat,:);
RhoQuantiles=1+ cQuantiles/T;
medRho=RhoQuantiles(id50);
ICRho=RhoQuantiles([id95;id90;id80;id70]); 

 



