Hi,
I try to run a tobit regression on the panel dataset through the following code. However, it does not successfully skip error of
Can you give me some suggestions? I have attached a sample of my data for testing the code. Many thanks.
I try to run a tobit regression on the panel dataset through the following code. However, it does not successfully skip error of
Code:
insufficient observations r(2000);
Code:
local depent pat cite exi6 exr6 foreach dep of local depent{ forvalues i= 1(1)10{ tobit head1`dep' time_treat PPETA LEV CAPEXTA Q LN_AGE SHORT_LIQ ROA RDTA i.year i.firm_id if industry==`i' & diff!=0 & 1990<=year<=2014 ,ll(0) vce(cluster year) if c(rc)==0{ eststo ols_`dep'_`i'_con1 } else if inlist(c(rc), 2000, 2001) { // NO OBSERVATIONS OR INSUFFICIENT OBSERVATIONS // ADVISE USER OF THE SITUATIOIN, BUT AS THIS IS // AN EXPECTED PROBLEM, MOVE ON display as error "industry=='i' : no or insufficient observations" } else { display as error "Unexpected error when industry == `i' " error c(rc) } } }
Comment