Dear Statalist,
I understand how to divide firms into industries and regress firms by industry, and how to divide firms into areas and regress firms by area. How to consider both industry and area? i.e., Regress firms by industry mean I can find other firms in the same industry, regress by area mean I can find other firms in the same area, how to consider both so that I can find other firms that are both in the same industry and area?
Here is my code that regresses by industry and by area respectively:
**by industry
reg var1 var 2 var3 if industry==1,r
outreg2 using "C:\Users\xxxx.doc",replace tstat bdec(3) tdec(3)
forvalues v= 2/13 {
reg var1 var 2 var3 if industry==`v',r
outreg2 using "C:\Users\xxxx.doc",append tstat bdec(3) tdec(3)
}
**by area
reg var1 var 2 var3 if eara==1,r
outreg2 using "C:\Users\yyyy.doc",replace tstat bdec(3) tdec(3) ctitle(East)
reg var1 var 2 var3 if eara==2,r
outreg2 using "C:\Users\yyyy.doc",append tstat bdec(3) tdec(3) ctitle(NorthEast)
reg var1 var 2 var3 if eara==3,r
outreg2 using "C:\Users\yyyy.doc",append tstat bdec(3) tdec(3) ctitle(Middle)
reg var1 var 2 var3 if eara==4,r
outreg2 using "C:\Users\yyyy.doc",append tstat bdec(3) tdec(3) ctitle(West)
I really appreciate any help you can provide.
Related Posts with regress by both industry and area
Twoway graph with one legend in commonDear all, I would need your support for a small problem with a graph to be fixed. I have a series o…
Eurobarometer and only look at varibles in one countryHi! I have an assignment where I would like to use Eurobarometer. What I want to do is to only look…
Different coefficients with XTREG and REGHDFEDear all. My name is Carlos and I am working in a gravity model with 133 countries in a time period…
convert quartiles to tertilesHello, I am Hatem Ali We summarize the associations corresponding to the top versus bottom third of…
LoopsI have a panel dataset with 26 countries and I want to create the below variables in order to do a t…
Subscribe to:
Post Comments (Atom)
0 Response to regress by both industry and area
Post a Comment