Hi there,

In a trend analysis, I am looking at whether hours worked changed across 15 years. Then I am seeing whether hours worked differs by 4 age groups. I already have coefficients (with p-values) for change in hours from baseline to each successive year, but I would like to see whether there is a significant differences between the slopes of each group (i.e. test whether the slopes for two [or more] independent populations are equal). Any ideas how to do this in Stata?

Code:
input float(m_yr m_yrqtr2) double m_hrsov_a float m_age_c
2007 20071   41 3
2007 20071    . 4
2007 20071    . 1
2007 20071    . 3
2007 20071    . 2
2007 20071    . 4
2007 20071    . 3
2007 20071    . 3
2007 20071    . 1
2007 20071    . 3
2007 20071   46 2
2007 20071    . 2
2007 20071    . 1
2007 20071    . 4
2007 20071    . 3
2007 20071    . 2
2007 20071   60 3
2007 20071    . 3
2007 20071    . 4
2007 20071    . 3
2007 20071    . 2
2007 20071    . 2
2007 20071    . 1
2007 20071    . 1
2007 20071    . 2
2007 20071    . 1
2007 20071    . 4
2007 20071   40 2
2007 20071    . 3
2007 20071    . 3
2007 20071    . 3
2007 20071    . 1
2007 20071    . 3
2007 20071    . 3
2007 20071    . 4
2007 20071    . 4
2007 20071 40.5 2
2007 20071    . 2
2007 20071    . 1
2007 20071    . 4
2007 20071    . 2
2007 20071    . 4
2007 20071    . 1
2007 20071    . 2
2007 20071   48 3
2007 20071   55 3
2007 20071    . 2
2007 20071    . 4
2007 20071 25.5 4
2007 20071    . 3
2007 20071    . 2
2007 20071    . 3
2007 20071    . 3
2007 20071    . 2
2007 20071    . 2
2007 20071   56 2
2007 20071    . 2
2007 20071    . 2
2007 20071    . 3
2007 20071   36 4
2007 20071    . 4
2007 20071   50 3
2007 20071    . 2
2007 20071   46 3
2007 20071    . 4
2007 20071    . 4
2007 20071    . 2
2007 20071    . 1
2007 20071    . 4
2007 20071   28 3
2007 20071    . 2
2007 20071    . 4
2007 20071    . 2
2007 20071    . 2
2007 20071    . 2
2007 20071    . 2
2007 20071    . 2
2007 20071    . 1
2007 20071    . 4
2007 20071   40 2
2007 20071    . 2
2007 20071    . 4
2007 20071    . 1
2007 20071    . 3
2007 20071    . 3
2007 20071    . 3
2007 20071    . 3
2007 20071   27 3
2007 20071    . 2
2007 20071    . 1
2007 20071    . 1
2007 20071    . 2
2007 20071   50 2
2007 20071   45 3
2007 20071   40 3
2007 20071   46 4
2007 20071    . 3
2007 20071    . 2
2007 20071    . 2
2007 20071    . 4
end
label values m_yr m_yrla
label values m_hrsov_a m_hrsov_ala
label values m_age_c m_age_cla
label def m_age_cla 1 "Gen. Z", modify
label def m_age_cla 2 "Millennials", modify
label def m_age_cla 3 "Gen. X", modify
label def m_age_cla 4 "Baby Boomers", modify
Thanks in advance for your help!