联立方程组以及极大似然估计
联立方程组操作
# open data
use truffles, clear
# examine data
describe
list in 1/5
summarize
# reduced form equations
reg q ps di pf
reg p ps di pf
predict phat
## 2sls of demand
reg q phat ps di
## however,se,t statistics and CI are wrong ##
#IV/2sls of demand equation
ivregress 2sls q (p=pf)