Dear Statalist,
I am very new on Stata, I want to divide my panel data into groups regarding to firm size (small firms and large firms). Based on the median of firm size in current year (2015), I have two groups by ID (one group includes all id with the firm size in 2015 >= median and the other group include the rest of id with the firm size<median in 2015) my thought is that I should creating the dummy variable of id (companies) then run two regressions on two sub-sample for large and small firm, respectively. However, the syntax did not work as following
sort id
by id: gen newid=1 if year=2015 & firm size>=732047.9 => syntax did not work!
Anyone can help me correct the syntax or instruct me the process! Many thanks!
Trang
I am very new on Stata, I want to divide my panel data into groups regarding to firm size (small firms and large firms). Based on the median of firm size in current year (2015), I have two groups by ID (one group includes all id with the firm size in 2015 >= median and the other group include the rest of id with the firm size<median in 2015) my thought is that I should creating the dummy variable of id (companies) then run two regressions on two sub-sample for large and small firm, respectively. However, the syntax did not work as following
sort id
by id: gen newid=1 if year=2015 & firm size>=732047.9 => syntax did not work!
Anyone can help me correct the syntax or instruct me the process! Many thanks!
Trang
Comment