new; output file = ma_ml.out reset ; library optmum; T = 50; let beta = .5; sigma = 2; Nsim =300 ; "Number of simulations:" Nsim ; /* create a matrix to hold the estimated values */ results = zeros(Nsim,3) ; /*generate an MA(1) */ let sv = 1 .1 1 ; estim=0 ; do while estim < Nsim ; estim=estim+1 ; u = sigma*rndn(T,1); x=zeros(T,1) ; x[1]=u[1]+beta*sigma*rndn(1,1); s=2; do while s