Announcement

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

  • To show the same condition from a previous year and of the actual year

    Hello everyone!

    I would like to generate a variable which shows the transitions, e.g. from temporary work to standard employment relationships (and vice versa), also from unemployment to work.
    More precisely: a person was in "t-1" in a temporary job and in "t" the same person is in a standard employment relationship, or the person was in "t-1" unemployed and now in "t" the person is working.
    I only have the variables from the actual year, and would like to generate variables for t-1.

    I tried as follows:
    Code:
    sort pid syear
    tsset pid syear
    pid= personal identification number
    syear= survey years
    zeitarbeitdeskr= temporary work dummy, 1= yes for temporary work, 0= no temporary work which means that it is automatically a standard employment relationship

    A friend told me that I could use for the transition "l1" :
    Code:
    gen l1zeitarbeitdeskr = l1.zeitarbeitdeskr
    Then I generated a new variable for the transitions. I would like to summarize the transitions from:
    1: from standard employment to standard employment
    2: from standard employment to temporary work
    3: from temporary work to standard employment
    4: from temporary work to temporary work

    Code:
    gen transitions = .
    replace transitions= 1 if zeitarbeitdeskr == 0 & l1zeitarbeitdeskr == 0
    replace transitions= 2 if zeitarbeitdeskr == 1 & l1zeitarbeitdeskr == 0
    replace transitions= 3 if zeitarbeitdeskr == 0 & l1zeitarbeitdeskr == 1
    replace transitions= 4 if zeitarbeitdeskr == 1 & l1zeitarbeitdeskr == 1
    I think that the transitions are formulated correctly, however I am quite unsure if this "l1" gives me the temporary work from t-1 ?
    Does somebody know if this is correct?

    Thank you very much.

    Kind regards,
    Tina




  • #2
    I think that the transitions are formulated correctly, however I am quite unsure if this "l1" gives me the temporary work from t-1 ?
    That is exactly what it does. Why are you unsure?

    Comment


    • #3
      Thank you. I just had some doubts because I have more observations than I should have.
      Stupid question - but regarding for example the transition from unemployment to permanent employment, I am not sure which respective command - concerning the IF condition - I should use, the one for unemployment (t-1) or the one for permanent work (t) since the two commands differ (e.g. for permanent employment I have to include that it it has to be an open-ended contract).

      Thank you.

      Kind regards, Tina

      Comment


      • #4
        [ ...] regarding for example the transition from unemployment to permanent employment, I am not sure which respective command -concerning the IF condition - I should use
        I wonder whether the command - xttrans - wouldn't be a nice starting point.
        Best regards,

        Marcos

        Comment


        • #5
          Hi Marcos,
          sorry I am not a Stata specialist.
          Could you maybe explain what you mean?
          Thank you very much.

          Kind regards,
          Tina

          Comment


          • #6
            Hello Tina,

            You just need to type directly in command window:

            Code:
            help xttrans
            Then, you can get information as well as interesting examples with - xttrans - command.
            Best regards,

            Marcos

            Comment

            Working...
            X