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
how to calculate variance of a variable in a panel data structureHello dear Stata users, I have a panel dataset of household weekly income at regional level (10 regi…
An Error marginHi there, This seems simple and basic statistics but I could not get my head around it. Can someon…
asdoc: Cutomizing the regression output | MS Word from Stata | Confidence Interval, adding stars, etc.I received several emails and comments on blog posts suggesting the addition of confidence intervals…
optimize: set skewness to zeroDear Statalisters, I wish to write a simple optimisation problem to find the optimal fractional pow…
Update-all: r(691) I/O errorWhen I started STATA today, the program said that new update is available. So I let STATA download u…
Subscribe to:
Post Comments (Atom)
0 Response to Person-Specific Indicator
Post a Comment