Chapter 15 Simulation-Based Estimation and Inference and Random Parameter Models 127
Applications
?================================================================
? Application 15.1. Monte Carlo Simulation
?================================================================
? Set seed of RNG for replicability
Calc ; Ran(123579) $
? Sample size is 50. Generate x(i) and z(i) held fixed
Sample ; 1 – 50 $
?****************************************************************
? Procedure studies the LM statistic
?****************************************************************
Proc = LM (c) $
? Three kinds of disturbances
Create ?; Eps = Rnt(5) ? Nonnormal distribution
?****************************************************************
? Procedure studies the Wald statistic
?****************************************************************
Proc = Wald(c) $
Create ; if(type=1)Eps = Rnn(0,1) ? Standard normal distribution
; if(type=2)vi=exp(.2*xi) ? eps = vi*rnn(0,1) ? Heteroscedasticity
; if(type=3)eps= Rnt(5) ? Nonnormal distribution
; y = 0 + xi + c*zi +eps $
Calc ; List ; Type1 = xbr(reject) ; pwr = 1-Type1 $