Hello everyone,
I came quite far on stata without help but I just cant figure this one out.
I am trying to calculate the mean of the wage growth for people. However, because I have data on multiple years, I am only interested in the wage growth before people go into self-employment, which all of them do. The variable to indicate this is pre_se (this is a 1 when they enter, otherwise its missing). I am also not interested in the first year cause the wage growth obviously will be 0 then. variables:
first_wage: subjects wage during the first wave that they take part in.
wave: indicates the wave number. the survey (bhps) conducted one questionnaire (wave) per year. A person does not have to take part from wave 1.
paynu_dv: gives net wage that the subjects earns per year.
pid: personal identifier: identifies the subject (stays the same over the waves)
My view on it, but that I cannot manage to put into stata:
bys pidp: gen delta_first_wage = (ln(paynu_dv) - ln(first_wage))/(ln(first_wage))
mean delta_first_wage if wave != min(wave) & wave < wave(pre_se)
Could you adapt it so I can implement it?
thanks in advance!
I came quite far on stata without help but I just cant figure this one out.
I am trying to calculate the mean of the wage growth for people. However, because I have data on multiple years, I am only interested in the wage growth before people go into self-employment, which all of them do. The variable to indicate this is pre_se (this is a 1 when they enter, otherwise its missing). I am also not interested in the first year cause the wage growth obviously will be 0 then. variables:
first_wage: subjects wage during the first wave that they take part in.
wave: indicates the wave number. the survey (bhps) conducted one questionnaire (wave) per year. A person does not have to take part from wave 1.
paynu_dv: gives net wage that the subjects earns per year.
pid: personal identifier: identifies the subject (stays the same over the waves)
My view on it, but that I cannot manage to put into stata:
bys pidp: gen delta_first_wage = (ln(paynu_dv) - ln(first_wage))/(ln(first_wage))
mean delta_first_wage if wave != min(wave) & wave < wave(pre_se)
Could you adapt it so I can implement it?
thanks in advance!
Comment