I am having a problem using -estab- to create an rtf.table output for some tabstats.
I am using Stata/MP15.0
I have data that looks like this:
ID_Company | Type_Company | Industry | Industry share | |
A | 1 (Domestic) | Mining | 5% | |
B | 1 | Manuf | 10% | |
C | 1 | Mining | 5% | |
D | 2 (Foreign) | Mining | 10% | |
E | 2 | Manuf | 7% |
I have created tabstat tables that sum the industry share by Type_Company
Ideally I would like the following table to be in rtf format for a report:
Domestic | Foreign | ||
Mining | 10 | 10 | |
Manuf | 10 | 7 |
Domestic | Foreign | ||
Mining | 10 | ||
Manuf | 10 | ||
Mining | 10 | ||
Manuf | 7 |
Code:
foreach i of numlist 1 2 7 { eststo `i' : estpost tabstat ind_share, by (Industry),if Type_Company== `i' , s(sum) nototal } esttab using test3.rtf, replace cell(sum(fmt(%9.1f)label("Share of Industry market value"))) noobs title("Table 3. shareholding by Industry") nomtitle nonumber mlabels("Domestic" "Foreign" "Public") varlabels(`e(labels)') varwidth(25) addnotes(Source: database, authors' own calculations) eststo clear
Would be most grateful for anyone's assistance
Best
Aroop
0 Response to estab problems
Post a Comment