clear
load('dataANCH.mat')
th=find(Ih==1);
tl=find(Ih==0);
result=nwest(r_vw,[ones(546,1) zscore([X_TECH1 pret])],12);% use X_TECH1 for panel A, X_TECH2 for panel B, X_TECH3 for panel C
resulth=nwest(r_vw(th,1),[ones(116,1) zscore([X_TECH1(th,:) pret(th,1)])],12);% use X_TECH1 for panel A, X_TECH2 for panel B, X_TECH3 for panel C
resultl=nwest(r_vw(tl,1),[ones(430,1) zscore([X_TECH1(tl,:) pret(tl,1)])],12);% use X_TECH1 for panel A, X_TECH2 for panel B, X_TECH3 for panel C
Table=[result.beta(2,1) resulth.beta(2,1) resultl.beta(2,1);
result.tstat(2,1) resulth.tstat(2,1) resultl.tstat(2,1);
100*result.rsqr 100*resulth.rsqr 100*resultl.rsqr];

