Dear all
I am using data from the UK Labour Force Survey with the aim of comparing earnings realisations in the labour market to youth's earnings expectations at age 30 from a different survey. As the sample size from the LFS would be too small if I used data on people that are exactly aged 30 years old, I am using data for adults aged 28-32 years old. However, on average adults aged less than 30 years old have lower earnings than the ones aged 30 years old, while the ones aged above 30 years old have higher earnings than the ones aged 30 years old. Before comparing the earnings expectation to the realised earnings observed in the LFS data i would like, to eliminate the age-related trend. My idea was to take the logarithm of annual earnings, generate a dummy for each age (28,29,30,31,32) and run the following regression
reg logannualpay age28 age29 age30 age31 age32
and then predict the detrended logannualpay
predict logannualpay_detrend
Does this method seem right?
Many thanks in advance!
I am using data from the UK Labour Force Survey with the aim of comparing earnings realisations in the labour market to youth's earnings expectations at age 30 from a different survey. As the sample size from the LFS would be too small if I used data on people that are exactly aged 30 years old, I am using data for adults aged 28-32 years old. However, on average adults aged less than 30 years old have lower earnings than the ones aged 30 years old, while the ones aged above 30 years old have higher earnings than the ones aged 30 years old. Before comparing the earnings expectation to the realised earnings observed in the LFS data i would like, to eliminate the age-related trend. My idea was to take the logarithm of annual earnings, generate a dummy for each age (28,29,30,31,32) and run the following regression
reg logannualpay age28 age29 age30 age31 age32
and then predict the detrended logannualpay
predict logannualpay_detrend
Does this method seem right?
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(annualgrosspay age28 age29 age30 age31 age32) int year float educat byte(SEX GOVTOF21)
26502.36 1 0 0 0 0 2019 1 2 10
36101.64 1 0 0 0 0 2019 1 2 10
36101.64 1 0 0 0 0 2019 3 1 10
42153.36 0 0 0 0 1 2019 1 1 10
31458.51 0 0 0 1 0 2019 3 1 10
17059.59 1 0 0 0 0 2019 3 1 10
25093.77 0 0 0 0 1 2019 3 1 10
18676.86 0 0 0 0 1 2019 3 2 10
35110.41 1 0 0 0 0 2019 1 2 10
40014.39 0 0 0 1 0 2019 3 1 10
51491.79 0 0 1 0 0 2019 1 1 10
28067.46 1 0 0 0 0 2019 1 2 10
78150.66 0 0 0 0 1 2019 1 2 10
28902.18 1 0 0 0 0 2019 3 1 10
18050.82 1 0 0 0 0 2019 3 2 10
84254.55 0 0 0 0 1 2019 2 1 10
21859.23 0 1 0 0 0 2019 3 1 10
28902.18 0 0 0 1 0 2019 1 1 10
26085 0 1 0 0 0 2019 2 2 10
30988.98 0 1 0 0 0 2019 3 2 10
30102.09 1 0 0 0 0 2019 3 2 10
26085 0 1 0 0 0 2019 3 1 10
30675.96 1 0 0 0 0 2019 3 1 9
22850.46 0 0 0 0 1 2019 3 1 9
72255.45 0 0 1 0 0 2019 3 1 9
24572.07 1 0 0 0 0 2019 1 2 9
12051.27 0 0 0 1 0 2019 3 1 9
38136.27 0 1 0 0 0 2019 1 2 9
18833.37 0 0 0 1 0 2019 3 1 9
22120.08 0 0 1 0 0 2019 1 2 9
27076.23 0 0 0 0 1 2019 1 1 9
30102.09 0 1 0 0 0 2019 1 1 9
27597.93 0 0 1 0 0 2019 3 1 9
35110.41 0 0 0 0 1 2019 1 2 9
20189.79 0 1 0 0 0 2019 1 2 9
49300.65 0 0 0 1 0 2019 2 1 9
41944.68 1 0 0 0 0 2019 1 2 9
40118.73 0 0 0 1 0 2019 3 1 9
50187.54 0 0 0 1 0 2019 3 2 9
33701.82 0 0 0 0 1 2019 1 2 9
51491.79 0 0 1 0 0 2019 1 2 9
38136.27 0 0 0 0 1 2019 1 1 9
25093.77 1 0 0 0 0 2019 3 1 9
30102.09 0 0 0 1 0 2019 2 1 9
26085 0 0 0 1 0 2019 1 1 9
39127.5 0 1 0 0 0 2019 1 2 9
30102.09 0 1 0 0 0 2019 3 1 9
36101.64 0 1 0 0 0 2019 1 2 9
33336.63 0 0 1 0 0 2019 1 2 9
22067.91 1 0 0 0 0 2019 1 2 9
32084.55 0 0 0 0 1 2019 1 1 9
19355.07 1 0 0 0 0 2019 3 1 9
26085 0 1 0 0 0 2019 3 1 9
22067.91 0 0 0 1 0 2019 3 1 8
53161.23 0 0 1 0 0 2019 1 1 8
85297.95 0 1 0 0 0 2019 1 1 8
85297.95 1 0 0 0 0 2019 1 1 8
78255 1 0 0 0 0 2019 1 1 8
57178.32 0 1 0 0 0 2019 1 2 8
26085 0 1 0 0 0 2019 1 1 8
48152.91 1 0 0 0 0 2019 1 2 8
48152.91 0 0 0 0 1 2019 1 1 8
44135.82 0 1 0 0 0 2019 1 2 8
78255 0 1 0 0 0 2019 1 2 8
34119.18 0 0 0 0 1 2019 1 2 8
123016.86 0 0 0 1 0 2019 1 1 8
65212.5 0 0 0 0 1 2019 1 1 8
65212.5 0 1 0 0 0 2019 1 2 8
69020.91 0 0 0 0 1 2019 1 1 8
35110.41 1 0 0 0 0 2019 1 1 8
25093.77 0 0 0 1 0 2019 1 2 8
32084.55 0 0 1 0 0 2019 1 2 9
28067.46 1 0 0 0 0 2019 1 1 9
21754.89 0 0 1 0 0 2019 1 1 9
9651.45 0 0 0 1 0 2019 3 1 8
40118.73 0 0 0 1 0 2019 3 2 9
49352.82 0 0 0 0 1 2019 1 1 8
37145.04 0 1 0 0 0 2019 1 1 8
15024.96 1 0 0 0 0 2019 3 2 8
90306.27 0 0 0 0 1 2019 1 2 8
29110.86 0 0 0 1 0 2019 1 2 8
45127.05 0 0 1 0 0 2019 1 1 8
16068.36 0 1 0 0 0 2019 3 2 8
50187.54 0 0 0 0 1 2019 1 2 8
108357.1 0 0 0 1 0 2019 1 1 8
36101.64 0 0 0 0 1 2019 2 1 8
100322.9 0 0 1 0 0 2019 1 2 8
45127.05 0 0 0 0 1 2019 1 1 8
5999.55 0 0 0 0 1 2019 1 2 8
47631.21 0 0 0 0 1 2019 1 2 8
35892.96 1 0 0 0 0 2019 1 2 8
69229.59 0 0 1 0 0 2019 1 1 8
42153.36 0 0 0 0 1 2019 1 2 7
42153.36 0 1 0 0 0 2019 1 2 8
29110.86 0 0 1 0 0 2019 3 1 8
15024.96 1 0 0 0 0 2019 2 2 7
38501.46 0 0 0 1 0 2019 1 2 8
65212.5 0 0 0 1 0 2019 3 1 8
60204.18 1 0 0 0 0 2019 1 1 8
30102.09 1 0 0 0 0 2019 3 2 7
end
label values educat educat
label def educat 1 "Degree or equivalent", modify
label def educat 2 "Higher education", modify
label def educat 3 "GCE A level and below", modify
label values SEX SEX
label def SEX 1 "Male", modify
label def SEX 2 "Female", modify
label values GOVTOF21 GOVTOF21
label def GOVTOF21 7 "Eastern", modify
label def GOVTOF21 8 "London", modify
label def GOVTOF21 9 "South East", modify
label def GOVTOF21 10 "South West", modify
Many thanks in advance!

Comment