n=30;
p=10;
y=randn(n,1);
x=randn(n,p);
x(:,1) = y + 2*randn(n,1);
for ip=1:p
  [b,bint,r,rint,stats] = regress(y,[x(:,1:ip),ones(n,1)]);
  p_val(ip) = stats(3)
end
[find(p_val==min(p_val)), 1-(1-min(p_val)).^p, corr2(y,x(:,1))]
