Dear Statalist,
I would like to get your advice about a stata command.
I prefer to generate a small sample of analyst (fiscal-year):one group is fiscal_year- analyst who forecast high-tech firms; the other is fiscal_year - analyst who forecast both high-tech firms and non high-tech firms.
I am wondering whether my following command is correct:
sort gvkey fiscal_year
by gvkey fiscal_year: gen analyst = 1
replace analyst =0 if high_tech == 0
gen analyst_all = 0
replace analyst_all = 1 if analyst == 1 & analyst == 0
And I will use 'if' when I run the regression.
I suspect I may do wrong for the later one.
I am wondering can you correct me if possible?
Thank you.
Related Posts with Query of small sample
January effect regressionHello Guys I have a question related to regression. I have a Data in which in the columns there are…
Question Stata (Seasonal effects in stock market)Hello Guys Im from Switzerland and have some difficulties using Stata. I hope there are some expert…
Controlling numbers with esttabHi Stata community, I have several regressions that I would ideally put in one table, but there are…
KMatch: Memory Management in Nearest-Neighbor Matching with TiesHi Everyone! Currently running Stata 16. I'm trying to do nearest neighbor matching with Kmatch usi…
Renaming multiple string values of a variableHello all. I have an ICD10 code variable that has about 6000 different values in string format. I al…
Subscribe to:
Post Comments (Atom)
0 Response to Query of small sample
Post a Comment