Let’s load the dataset.

/* Dataset is cabinet.dta */

use "/Users/liwugan/Dropbox/event_history/dta/cabinet.dta"

Table 3.3

We estimate the generalized gamma and Weibull models, and store the results.

* Estimate generalized gamma model

eststo clear

eststo: streg invest polar numst format postelec caretakr, dist(ggamma) time

* Estimate weibull model 

eststo: streg invest polar numst format postelec caretakr, dist(weib) time

We can generate the results in a table now.

* Reset working directory to collect following output 

cd ~/Dropbox/event_history/rmd

* Generate regression table output 

esttab using ch3_gg_weib.html, replace ///
    coeflabel(  _t:invest "Investiture" _t:polar "Polarization" _t:numst "Majority" ///
                _t:format "Formation" _t:postelec "Post-Election" _t:caretakr "Caretaker" ///
                _t:_cons "Constant") ///
    title(Generalized Gamma Model of Cabinet Durations) ///
    mtitles("Generalized Gamma" "Weibull") ///
    eqlabels("", none) ///
    b(2) se(2) nostar ///
    stats(ll N, label("Log-Likelihood" "<em>N</em>") fmt(2 0)) nogaps