I have firm-year level data. I want to create person-specific indicators (not firm-specific). However, there are multiple groups (5) that a person can be in. In fact, most people will be in different groups for different years (although each person is only in one firm-year-group at a time). Thus something like this wouldn't be adequate:
reg yvar xvar i.group1 i.group2 etc.
Therefore, I think I need to create an indicator variable for each person, something like Person1, Person2, etc. as a dummy variable. However, I have thousands of people in my data. What is the most efficient way to code this? I've experimented with a few loops to no avail.
Finally, what is the best way to add these variables to a regression command? I don't think this would work based on what I have tried:
reg yvar xvar person*
Thanks!
Related Posts with Person-Specific Indicator
drawing normally distributed random variable within an intervalHello everyone, How can I create a normally distributed variable within [a,b], with HTML Code: me…
Creating start and end variablesHello, I would like to create start and end variables according to the data collection wave in which…
xtlogit with cross-autocorrelationDear all, I start my project with panel data and xtlogit command. In the case of presence of seria…
Creating indicator variables xi, prefix() for an interaction termHi STATA friends, I aim to generate indicator variables regarding the interaction term c.budgetbala…
Online courses/Summer school to learn STATAHello, I am looking for a short courses during the summer in Europe to learn some knowledge using S…
Subscribe to:
Post Comments (Atom)
0 Response to Person-Specific Indicator
Post a Comment