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.