To create the In data
set, enter this code into a Program tab:
data in;
label q = "Quantity"
p = "Price"
s = "Price of Substitutes"
y = "Income"
u = "Unit Cost";
drop i e1 e2;
p = 0; q = 0;
do i = 1 to 60;
y = 1 + .05*i + .15*rannor(123);
u = 2 + .05*rannor(123) + .05*rannor(123);
s = 4 - .001*(i-10)*(i-110) + .5*rannor(123);
e1 = .15 * rannor(123);
e2 = .15 * rannor(123);
demandx = 1 + .3 * y + .35 * s + e1;
supplyx = -1 - 1 * u + e2 - .4*e1;
q = 1.4/2.15 * demandx + .75/2.15 * supplyx;
p = ( - q + supplyx ) / -1.4;
output;
end;
run;