I am trying to get the regression result of a structure model (which include three equations) through "cmp".
the structure model is below
Code:
(OLS model)X= Shock_dummy_variable + Firm Fixed effect + year Fixed effect (Tobit model)B= X + Firm Fixed effect + year Fixed effect (Tobit model)Y= B + X + Firm Fixed effect + year Fixed effect
Code:
cmp ($x = Shock_dummy_variable i.company_ID i.year) ($B = $x i.company_ID i.year) ($y = $B $x i.company_ID i.year), /// indicators($cmp_cont "cond($RD>0, $cmp_cont, $cmp_left)" "cond($y>0, $cmp_cont, $cmp_left)") qui eststo:estpost margins, dydx ($B $x) predict(ystar(0 .) eq(#3)) force estimates store ${file_name}_${y}_3 cmp ($x = Shock_dummy_variable i.company_ID i.year) ($B = $x i.company_ID i.year) ($y = $B $x i.company_ID i.year), /// indicators($cmp_cont "cond($RD>0, $cmp_cont, $cmp_left)" "cond($y>0, $cmp_cont, $cmp_left)") qui eststo:estpost margins, dydx ($x) predict(ystar(0 .) eq(#2)) force estimates store ${file_name}_${y}_2 cmp ($x = Shock_dummy_variable i.company_ID i.year) ($B = $x i.company_ID i.year) ($y = $B $x i.company_ID i.year), /// indicators($cmp_cont "cond($RD>0, $cmp_cont, $cmp_left)" "cond($y>0, $cmp_cont, $cmp_left)") qui eststo:estpost margins, dydx (Shock_dummy_variable) estimates store ${file_name}_${y}_1 reg2docx ${file_name}_${y}_1 ${file_name}_${y}_2 ${file_name}_${y}_3 using ${file_name}_${y}.docx, replace scalars(N) brackets /// order (Shock_dummy_variable $B $x) /// indicate("Country Fixed Effects=Country" "Industry Fixed Effects=Industry" "Year Fixed Effects=year") b(%8.3f) se(%8.3f)
In the beginning, I got below
Code:
" _mopt_matsum_xy(): 103 Stata returned error moptimize_util_matsum(): - function returned error opt__eval_nr_lf1(): - function returned error opt__eval(): - function returned error opt__looputil_iter0_common(): - function returned error opt__looputil_iter0_nr(): - function returned error opt__loop_nr(): - function returned error opt__loop(): - function returned error _moptimize(): - function returned error Mopt_maxmin(): - function returned error <istmt>: - function returned error too many variables specified too many variables specified"
Code:
set maxvar 32767, permanently
Code:
Fitting individual models as starting point for full model fit. Fitting constant-only model for LR test of overall model fit. Fitting full model.
Could you please give me some advice about it? Is there any error in my code? and what should I do about this?
thanks in advance.
0 Response to three equations in structure model through "cmp"
Post a Comment