I have written a program which does not output my values correctly
Code:
program Datageneration, rclass
matrix my = (2\2\2)
matrix cov = (3,1.25,0.75\1.25,1,0.6\0.75,0.6,1)
drawnorm x1 x2 x3, n(200) means(my) cov(cov)
gen y=x1
regress y x1
return scalar b1=_b[x]
end
which returns "non r-class program may not set r()".

Where in my programming have I gone wrong?