Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • plot pre-trend

    Dear all

    I have longitudinal penal data from Jan 2019 to Des 2021, following individuals for five quarters. I intend to estimate the wages ( hour pay) after the collapse of the data on the industry and quarter. But when I did this, I found the results were the opposite when I estimated the log hour pay, so I want to look at the pre-trend of "hour pay" and "log hour pay" based on industry and compare them to decide which one is more appropriate to pick on in my estimation.

    Could you help me with how to implement the pre-trend for hourly pay and log hourly pay?

    Note that the pre-period is from Jan 2019 to Des 2019, then COVID-19 happened, and the post-period is from April 2020 to Des 2021
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double PERSID byte quarter double HOURPAY float logHourpay long industry1
    10101010101 9 . . 13
    10102020102 7 . . 7
    10102020102 9 . . 7
    10104030101 9 . . 12
    10104030101 11 . . 12
    10104030102 9 . . 12
    10104030102 11 . . 12
    10203030101 8 . . 23
    10203030101 10 . . 23
    10303030101 7 . . 18
    10303030101 9 . . 18
    10303030101 11 . . 18
    10501030101 7 . . 18
    10501030101 9 12.66 2.5384474 18
    10602020101 6 . . 23
    10602020101 8 . . 23
    10602020101 10 . . 23
    10603070101 8 . . 20
    10604060102 8 15.05 2.711378 12
    10604060102 10 . . 12
    10604060102 12 . . 12
    10604070101 12 . . 1
    10604070103 8 2.88 1.0577903 1
    10604070103 10 . . 1
    10604070103 12 . . 23
    10701010101 7 . . 7
    10701010101 9 11.43 2.4362414 7
    10794010101 7 . . 1
    10794010102 7 . . 1
    10801020104 8 . . 23
    10802020101 6 17.27 2.848971 5
    10802020101 8 . . 5
    10802020101 10 16.84 2.823757 5
    10802020102 6 12.83 2.551786 12
    10802020102 8 . . 12
    10802020102 10 13.31 2.5885155 12
    11001010101 6 . . 23
    11001010101 8 . . 23
    11003030101 8 . . 12
    11003030101 10 . . 12
    11094010102 6 . . 12
    11094010102 8 12.25 2.505526 12
    11102010101 7 . . 12
    11102010101 9 . . 12
    11104070101 9 . . 7
    11104070101 11 . . 7
    11292020101 6 9.5 2.2512918 23
    11304060101 9 . . 2
    11304060101 11 . . 2
    20104030101 9 . . 12
    20104030101 11 . . 12
    20104030102 9 . . 7
    20104030102 11 . . 7
    20203050101 8 . . 23
    20203050101 10 . . 23
    20203050102 8 . . 5
    20203050102 10 . . 5
    20294040101 6 . . 1
    20294040101 8 15.18 2.719979 1
    20303040101 7 . . 1
    20303040101 9 . . 1
    20303040101 11 . . 1
    20303040102 9 . . 1
    20303040102 11 . . 1
    20304040102 9 . . 14
    20304040102 11 . . 14
    20304040103 9 . . 23
    20304040103 11 . . 23
    20494030101 6 . . 23
    20494030101 8 8.25 2.1102133 23
    20494030102 6 . . 7
    20494050101 6 . . 7
    20494050101 8 11.74 2.463002 7
    20603050102 8 . . 18
    20603050102 10 . . 18
    20603060101 8 . . 12
    20603060101 10 . . 12
    20604010101 8 10.17 2.3194423 12
    20604010101 10 . . 12
    20604010101 12 11.25 2.420368 12
    20703040101 7 15.21 2.721953 23
    20703040101 9 . . 23
    20703040101 11 15.89 2.76569 23
    20703040102 7 9.18 2.2170272 23
    20703040102 9 . . 22
    20703040102 11 12 2.484907 23
    20704060101 9 . . 12
    20704060101 11 . . 12
    20801050102 6 . . 7
    20801050102 8 . . 7
    20801050103 6 . . 12
    20801050103 8 . . 12
    21004030101 8 11 2.397895 5
    21004030101 10 . . 5
    21004030101 12 12.44 2.520917 5
    21004040103 8 8.69 2.162173 23
    21004040103 10 . . 23
    21004040103 12 8.65 2.1575594 23
    21101010102 7 . . 12
    21101010102 9 19.68 2.979603 12
    end
    label values quarter quarter
    label def quarter 6 "Apr-June 2020", modify
    label def quarter 7 "July-Sep 2020", modify
    label def quarter 8 "Oct-Des 2020", modify
    label def quarter 9 "Jan-Mar 2021", modify
    label def quarter 10 "Apr-June 2021", modify
    label def quarter 11 "July-Sep 2021", modify
    label def quarter 12 "Oct-Des 2021", modify
    label values HOURPAY HOURPAY5
    label values industry1 industry
    label def industry 1 "Accommodation And Food Service Activities", modify
    label def industry 2 "Administrative And Support Service Activities", modify
    label def industry 5 "Construction", modify
    label def industry 7 "Education", modify
    label def industry 12 "Human Health And Social Work Activities", modify
    label def industry 13 "Information And Communication", modify
    label def industry 14 "Manufacturing", modify
    label def industry 18 "Professional, Scientific And Technical Activities", modify
    label def industry 20 "Real Estate Activities", modify
    label def industry 22 "Water Supply, Sewerage, Waste Management And Remediation Activities", modify
    label def industry 23 "Wholesale And Retail Trade; Repair Of Motor Vehicles And Motorcycles", modify


  • #2
    Code:
    collapse (mean) HOURPAY , by(industry1 quarter)
    g lHOURPAY = ln(HOURPAY)
    lgraph HOURPAY quarter, by(industry1)
    lgraph lHOURPAY quarter, by(industry1)

    Comment

    Working...
    X