Announcement

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

  • Panel data and within individual effects

    Hi everyone,

    I have a panel dataset where I follow individuals for 12 waves (new_waves).
    What I am trying to do is figure out the effect of education within individuals on the DV, but I need guidance as to how to capture this change.
    For instance, the data below show just one respondent who was present in all 12 waves. In wave number 9, this person attained a university degree
    I have also eduw=1 which is a "No completed education/Elementary school."

    My question is, how can I create a binary variable for eduw for individuals going from eduw=1 to eduw=2 and those from eduw=2 to eduw=3? or some other type of command that can help me achieve this?

    So when I analyze the data, I will have the within individual effects and not the between effects.


    I have been trying to create them but it captures those who have one type of education throughout the study, while I am only interested in those who go through education levels.

    Thanks in advance,



    [CODE]

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte new_wave long responseid byte eduw
     1 1000062 2
     2 1000062 2
     3 1000062 2
     4 1000062 2
     5 1000062 2
     6 1000062 2
     7 1000062 2
     8 1000062 2
     9 1000062 3
    10 1000062 3
    11 1000062 3
    12 1000062 3
    end
    label def eduw 1 "No completed education/Elementary school", modify
    label def eduw 2 "Upper secondary education", modify
    label def eduw 3 "University education", modify

  • #2
    Your example data does not include a dependent variable, nor does it include data from more than one respondent. But for the within-respondent effect of eduw, you do not need to calculate any new variables.

    Code:
    xtset responseid wave
    xtreg DV i.eduw, fe
    will do.

    Comment

    Working...
    X