Announcement

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

  • Creating yearly data from retrospective questions: Survival analysis

    Dear Statlisters,

    I have retrospective questions about the employment status and the year of the start of this status for four previous jobs.
    I am trying to create from these questions yearly data for each individual. Kindly find below an example of my data so you can have an impression of the variables.

    After doing this, I will add other job characteristics for these four previous jobs and then, I will calculate the spell length and the failure variables. The event is the transition to non-employment.

    Could you please help me on the code to create the yearly data on these retrospective questions? In addition, I would like to add the end date of the employment status in order to be able to calculate the spell length.

    Thank you, Maye

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str11 indid int age float(year marriageage endage nchild) int q6104y byte q6104_01 int q6103y byte q6103_01 int q6102y byte q6102_01 int q6101y byte q6101_01
    "12010001101" 15 1978 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 16 1979 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 17 1980 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 18 1981 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 19 1982 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 20 1983 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 21 1984 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 22 1985 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 23 1986 24 49 0 . . . . 1991 8 1982 1
    "12010001101" 24 1987 24 49 0 . . . . 1991 8 1982 1
    end
    label values q6101_01 Lmempst
    label values q6102_01 Lmempst
    label values q6103_01 Lmempst
    label values q6104_01 Lmempst
    label def Lmempst 1 "1. Waged Employee", modify
    label def Lmempst 8 "8. Housewife", modify

  • #2
    The example data you gave us already seems to be yearly: The same person (12010001101) appears multiple times in your dataset once when she is 15 in 1978, once when she is 16 in 1979, etc.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Yes, I managed to turn the dataset into yearly data.
      However, I was not able to turn the retrospective questions of the four employment statuses and the date of entry into these employment statuses into yearly data to be able to calculate the spell length.

      Comment


      • #4
        and merge these current and previous employment statuses into one variable as well.

        Comment

        Working...
        X