I have the following data set, a panel dataset, (it is an example of what I have, the data set is much larger):
Year Individual Wage Mean_wage (this is the variable I want to create)
1998 1 60 70
1999 1 70 70
2000 1 80 70
1998 2 50 56,56
1999 2 50 56,56
2000 2 70 56,56
I would like to generate a new variable, which is the mean of the wage of each individual over the years, that is, the variable has to has the same value of the individual over the years. Probably, it's not clear, so I have create the variable mean_wage as an example. Anyone can help me?
Thanks!
Related Posts with Generate a new variable as the mean of individuals over time
Include Dummy variable in Time Series Analysis, analyze subsamplesHello, I am currently analyzing the relationship between consumption and income and I have quarterl…
Diff-in-Diff-in-Diff (DDD) using multiple countries and time periodsHello, I am trying to understand how to perform a Diff-in-Diff-in-Diff (DDD) in Stata as explained …
Residual centering (i.e., orthogonalizing)Hello All stata list members, How can i do it in stata if my two variables are x1 ,x2 and its Produc…
xtserial and xttest2Hello, I am running a panel regression using xtreg, fe with an unbalanced dataset (small T, large N…
Execute single commands of a Do-File on MacHello everyone, my question is: How do I execute single commands of a Do-File on a Mac? In Windows …
Subscribe to:
Post Comments (Atom)
0 Response to Generate a new variable as the mean of individuals over time
Post a Comment