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
Dynamically change variable used in evaluation across rows, for example like this: gen result2a = *data2_varK * `=data2_varJ[_n]'Hello Statalist, 1. Problem description I have a data set that is produced by a data base in the f…
Two-level Logistic Regression with Complex Survey Design - QueryHello, I am relatively new to Stata (and Multilevel Modelling more broadly), and would be grateful …
Label two Y axis with Xtline codeI am using an xtline to graph two variables with very different scales. I am using the code below x…
MHTEXP*Theorem 3.1 Adjusted Values ExtractionHi everyone, I have been trying to create a matrix of List's MHT adjusted p-values that I get after…
5-year relative survival: stpm2Dear Listers, I am running relative survival analysis to explore disease status (yes vs. no) and ha…
Subscribe to:
Post Comments (Atom)
0 Response to regress by both industry and area
Post a Comment