# change "/Users/clsu/KnitroAMPL/knitroampl" to the location where your "knitroampl" solver is. # option knitro_options 'alg=1 outlev=3 opttol=1.0e-6 feastol=1.0e-6', solver "/Users/clsu/KnitroAMPL/knitroampl"; # option presolve 0; model BLPMPEC.mod; data BLPMPEC.dat; ### Use this initial guess let {k in K2, d in Demogr} PI[k, d] := 0; let PI[1, 1] := 5.4819 ; let PI[1, 3] := 0.2037 ; let PI[2, 1] := 15.8935 ; let PI[2, 2] := -1.2 ; let PI[2, 4] := 2.6342 ; let PI[3, 1] := -0.2506 ; let PI[3, 3] := 0.0511 ; let PI[4, 1] := 1.2650 ; let PI[4, 3] := -0.8091 ; let SIGMA[1] := 0.3302; let SIGMA[2] := 2.4526; let SIGMA[3] := 0.0163; let SIGMA[4] := 0.2441; let {k in K1} theta1[k] := iniTheta1[k]; let {mj in MJ} delta[mj] := iniDelta[mj]; let {h in H} Zw[h] := sum {mj in MJ} Z[mj,h]*w[mj] ; fix PI[1,2]; fix PI[1,4]; fix PI[2,3]; fix PI[3,2]; fix PI[3,4]; fix PI[4,2]; fix PI[4,4]; display GMM; display max({mj in MJ} (EstShare[mj]-ActuShare[mj]) ) ; display max({mj in MJ} (w[mj] - delta[mj] + sum {k in K1} (X1[mj,k]*theta1[k]) )) ; display max({h in H} (Zw[h] - sum {mj in MJ} Z[mj,h]*w[mj])) ; solve; display GMM ; display theta1; display SIGMA; display PI ; display max({mj in MJ} (EstShare[mj]-ActuShare[mj]) ) ; display max({h in H} (Zw[h] - sum {mj in MJ} Z[mj,h]*w[mj])) ;