workfile monte u 1 1000
!series = 10
!draws = 100
!sigmax = 3
smpl 1 !series
series x
x.fill 1,2,3,4,5,6,7,8,9,10
!sigmau = 1
!alpha = 2
!beta = 3
vector(!draws) betavec = 0
for !n = 1 to !draws
series u = !sigmau*nrnd
series y = !alpha + !beta*x + u
equation eq1.ls y c x
betavec(!n) = @coefs(2)
next
smpl 1 !draws
series betaser = 0
mtos(betavec,betaser)
betaser.hist