Announcement

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

  • ttest for employment transitions

    Hi everyone!
    I’m using Stata 14.2 for my thesis which deals with the effect of temporary agency work on job satisfaction. I have to analyse the employment transitions from:
    1. normal work (t-1) to normal work (t)
    2. normal work (t-1) to temporary agency work (t)
    3. temporary agency work (t-1) to normal work (t)
    4. temporary agency work (t-1) to temporary agency work (t-1)
    e.g. for 2.: how does the job satisfaction change if a person moves from normal work to temporary agency work (the theory says that when moving from normal work to temporary agency work, job satisfaction decreases).

    I have the following variables:
    • pid: personal identification number
    • syear: survey year, I have to restrict it to 2001-2015
    • agencywork: a dummy variable, coded 0 for normal work and 1 for temporary agency work
    • jobsatisfaction: ordinal level of measurement, 0-10 (“completely dissatisfied” to “completely satisfied”) Liker-type scale
    • l1jobsatisfaction: I created this lagged variable for t-1 with the command
      Code:
      gen l1jobsatisfaction = l1.jobsatisfaction

    I managed to get the descriptive results for the four employment transitions. However, I have to use the ttest to analyse the significance levels for each employment transition (the same as in the picture I uploaded) regarding the difference in job satisfaction (job satisfaction in t minus job satisfaction in t-1). For a better understanding, please have a look at the picture, although it is in German.

    Click image for larger version

Name:	Unbenannt.PNG
Views:	1
Size:	80.5 KB
ID:	1419069


    I have some clue, but I don’t know if this is the right way (my professor gave me the ttest command for unpaired): I created a new variable for normal work: x for t, and y for t-1:
    Code:
    gen x =1 if agencywork == 0
    gen y =1 if x[_n-1]==1 & pid[_n]==pid[_n-1] & agencywork == 0
    gen test_x =jobsatisfaction*x
    gen test_y =l1jobsatisfaction*y
    ttest test_x==test_y, unp
    I get a value of: Pr(|T| > |t|) = 0.1669

    However, if I want to analyse the employment transition from temporary agency work in t-1 to normal work in t, I do not get the right value. I created also a new variable for temporary agency work: taw for t, taw1 for t-1.
    Code:
    gen taw =1 if agencywork == 1
    gen taw1 =1 if x[_n-1]==1 & pid[_n]==pid[_n-1] & agencywork == 1
    gen test_taw =jobsatisfaction*x
    gen test_taw =l1jobsatisfaction*taw1
    ttest test_taw==test_taw1, unp
    I do not get an acceptable result (because I think the problem is the x for normal work and the taw1 for temporary agency work). I get a value of: Pr(|T| > |t|) = 0.0000. However, in the picture I uploaded (the results are always very similar to mine), the employment transition is not statistically significant. Somewhere must be an error. I also have no real clue how to analyse the difference in job satisfaction for model 2 (normal work to temporary agency work) compared to model 1 (normal work to normal work) - the vs. (1) in the picture. The same for the other employment transitions (vs. 2, vs. 3, vs.4).
    I would be really glad if someone could help me because I tried to ask several colleagues but nobody knows the answer. Thank you very much in advance. I would be really happy if I get the right results.
    Thank you.

    Kind regards,
    Tina
Working...
X