function [t,seb,BINT]=tstatslope(y,X)
%computes the t statistic for testing slope=b1 in simple linear regression.
b1=.9054;                   % must define b1 on this line
[B,BINT,R,RINT,STATS] = REGRESS(y,X,.05);
s2=sum(R.^2)/(length(y)-2);   % this is variance estimate
seb=s2*inv(X'*X);        seb=sqrt(seb(2,2));   % this is standard error for slope
t=(B(2)-b1)/seb;