examples/example_frac_nodemog module¶
Executable example demonstrating FRAC estimation without demographics.
The example uses simulated data with all X1 variables generated as N(0,1) iid;
the user can modify the dimensions and other parameters of the simulation as desired.
run_example(T=50, J=20, n_X1_exo=1, n_X1_endo=1, n_X2_exo=0, n_X2_endo=1, n_Z=1, sigma_x=1.0, sigma_xi=1.0, rho_x_xi=np.sqrt(0.5), rho_x_z=np.sqrt(0.5), betas=np.array([-4.3, 1.0]), sigmas=np.array([1.0]))
¶
Simulates data and estimates it with FRAC without demographics; then repeats the estimation using the real data interface.
Source code in frac_blp/examples/example_frac_nodemog.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |