Simulation
In appendix 10F of POE4, the authors conduct a Monte Carlo experiment comparing the performance of OLS and TSLS. The basic simulation is based on the model
y = x + e (10.7)
x = nz1 + nz2 + nz3 + v (10.8)
The Zi are exogenous instruments that are each N(0,1). The errors, e and v, are
The parameter n controls the strength of the instruments and is set to either 0.1 or 0.5. The parameter p controls the endogeneity of x. When p = 0, x is exogenous. When p = 0.8 it is seriously endogenous. Sample size is set to 100 and 10,000 simulated samples are drawn.
The gretl script to perform the simulation appears below:
1 scalar N = 100
2 nulldata N
3 scalar rho =0.8 # set r = (0.0 or 0.8)
4 scalar p = 0.5 # set p = (0.1 or 0.5)
5 matrix S = {1, rho; rho, 1}
6 matrix C = cholesky(S)
7
7 series z1 = norm...
Read More