%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Data for Probit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

rand('state',37); % set arbitrary seed for uniform draws
randn('state',37); % set arbitrary seed for normal draws

n=1000; % number of observations

betatrue=[-1 2 0.8]';
X=[ones(n,1) 1.5+0.2*randn(n,1) -2.5+0.2*randn(n,1)];

eps=randn(n,1);
ystar=X*betatrue+eps;

% min(y)% approx -11
% max(y)% approx 20

y=ystar;
f0=find(ystar<=0);
f1=find(ystar>0);

y(f0)=0;
y(f1)=1; 

l0=length(f0);
l1=length(f1);

test=[l0;l1] %497 / 503

save c:\klaus\AAEC6564\mlab\worksp\probitdata;
