Announcement

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

  • creating change variables in panel-structure

    Dear Statalists,

    I am currently working on my master thesis with Paneldata from the German Socioeconomic Panel and have a problem regarding the created dummy variable: deprivation.
    Since deprivation-variables are from 2001 on and only available every second year I want to fill the missing years with the values of the previous year (which I know how to do).
    In order to do so I wanted to check, whether the income (5 categories in relation to median equivincome) of a person changes in the missing year, where I just filled in the value to make sure there wont be a bias. Therefore I want to create a change variable for deprivation and income (t to t+2; e.g. 2001 to 2003) and compare the two. I am only familiar with basic gen, recode and egen-commands and haven't found anything in the forum, probably because I am not really sure what I am looking for... can anyone help me?

    Thank you in advance!



  • #2
    Therefore I want to create a change variable for deprivation and income (t to t+2; e.g. 2001 to 2003) and compare the two.
    I do not understand what you mean by this.

    Perhaps the best thing is to repost, showing an example of your data (using the -dataex- command to do so) and to hand-calculate for a few cases the variable (or is it two variables?) you wish to create and show how those calculations worked.

    If you are running version 15.1 or a fully updated version 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    When asking for help with code, always show example data. When showing example data, always use -dataex-.

    Comment

    Working...
    X