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
 Conversion of monthly sting variable into monthly float variable for time series analysisHello everyone i am really new to stata and i have an econometrics paper due in a couple days and i … Conversion of monthly sting variable into monthly float variable for time series analysisHello everyone i am really new to stata and i have an econometrics paper due in a couple days and i …
 Panel data: Creating a variable that identifies respondents who answered a question at least once in a given survey yearGreetings,
I'm running Stata 15.1 on OSX and working with panel data. My goal is to assess temporal… Panel data: Creating a variable that identifies respondents who answered a question at least once in a given survey yearGreetings,
I'm running Stata 15.1 on OSX and working with panel data. My goal is to assess temporal…
 panel xtglsHi, i've got a problem with the estimation i'm doing. i have a panel with n=8 and T=27. i have teste… panel xtglsHi, i've got a problem with the estimation i'm doing. i have a panel with n=8 and T=27. i have teste…
 Meta analysis Stata 16I have 2 questions:
1. How to retain "zero" and "1" proportion in meta-analysis of proportion studie… Meta analysis Stata 16I have 2 questions:
1. How to retain "zero" and "1" proportion in meta-analysis of proportion studie…
 Error in strdupDear All,
I am trying to understand the exact reason the string duplication fails sometimes.
The do… Error in strdupDear All,
I am trying to understand the exact reason the string duplication fails sometimes.
The do…
Subscribe to:
Post Comments (Atom)
0 Response to Query of small sample
Post a Comment