Announcement

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

  • RESHAPE to long format

    Hi everyone,
    I am working with a longitudinal data set (four waves). I tried reshaping the important variables with this command:

    Code:
    reshape long part wave alter exkind anzkind wekind hheink aee_oecd ///
    help sum_helpfromchildren srh numphy cesd partner isced, ///
    i(fallnum) j(year, string)

    For most variables, this command has worked perfectly. However, some variables (isced, hheink, aee_oecd) do not reshape correctly. The values for the first two waves are transfered correctly. Yet, the values for the last two waves are not transfered at all (no observations).
    I would be greatful for any tips!
    Kind Regards,
    Lisa

  • #2
    please use -dataex- to provide a data example, i.e., type dataex in Stata and copy the output in the results window

    Comment


    • #3
      Hi Øyvind ,
      this is what I got with the command dataex isced_08 isced_11 isced_14 isced_17 in wide format:

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input byte(isced_08 isced_11 isced_14 isced_17)
      3 3 3 .
      2 2 2 2
      2 2 2 .
      2 2 . .
      3 3 3 .
      3 3 . .
      1 1 . .
      3 3 3 3
      1 1 1 .
      3 3 3 .
      2 2 2 2
      3 3 . .
      2 2 2 .
      2 2 2 .
      2 2 2 .
      1 1 . .
      1 1 1 .
      2 2 . .
      2 2 2 2
      3 3 3 3
      2 2 2 .
      2 2 . .
      2 2 . .
      1 1 . .
      3 3 . .
      2 2 . .
      3 3 . .
      3 3 3 .
      2 2 . .
      3 3 3 3
      3 3 3 .
      3 3 3 .
      1 1 1 .
      1 1 1 1
      1 1 . .
      3 3 . .
      3 3 . .
      2 2 . .
      3 3 . .
      2 2 2 .
      1 1 . .
      2 2 2 2
      2 2 2 2
      1 1 1 1
      2 2 2 2
      3 3 3 3
      2 2 . .
      2 2 . .
      3 3 3 3
      2 2 . .
      2 2 2 .
      2 2 . .
      2 2 . .
      2 2 . .
      1 1 1 1
      2 2 2 2
      1 1 1 .
      1 1 1 1
      3 3 . .
      2 2 . .
      1 1 1 1
      2 2 2 2
      2 2 . .
      2 2 2 .
      2 2 . .
      2 2 2 2
      2 2 . .
      2 2 . .
      3 3 3 3
      2 2 . .
      2 2 2 2
      3 3 3 3
      1 1 . .
      1 1 . .
      1 1 . .
      1 1 1 .
      2 2 . .
      2 2 . .
      3 3 3 3
      2 2 . .
      2 2 2 2
      3 3 . .
      3 3 . .
      2 2 . .
      2 2 . .
      2 2 2 2
      3 3 3 .
      3 3 3 .
      2 2 . .
      2 2 2 2
      3 3 3 3
      1 1 1 1
      3 3 . .
      2 2 2 2
      2 2 2 2
      1 1 1 1
      2 2 2 2
      2 2 . .
      3 3 . .
      3 3 3 .
      end
      label values isced_08 ISCED_08
      label def ISCED_08 1 "1. niedrig (ISCED 0-2)", modify
      label def ISCED_08 2 "2. mittel (ISCED 3-4)", modify
      label def ISCED_08 3 "3. hoch (ISCED 5-6)", modify
      label values isced_11 ISCED_11
      label def ISCED_11 1 "1. niedrig (ISCED 0-2)", modify
      label def ISCED_11 2 "2. mittel (ISCED 3-4)", modify
      label def ISCED_11 3 "3. hoch (ISCED 5-6)", modify
      label values isced_14 ISCED_14
      label def ISCED_14 1 "1. niedrig (ISCED 0-2)", modify
      label def ISCED_14 2 "2. mittel (ISCED 3-4)", modify
      label def ISCED_14 3 "3. hoch (ISCED 5-6)", modify
      label values isced_17 ISCED_17
      label def ISCED_17 1 "1. niedrig (ISCED 0-2)", modify
      label def ISCED_17 2 "2. mittel (ISCED 3-4)", modify
      label def ISCED_17 3 "3. hoch (ISCED 5-6)", modify

      This is after reshaping to long format:
      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input byte isced
      3
      3
      3
      .
      2
      2
      2
      2
      2
      2
      2
      .
      2
      2
      .
      .
      3
      3
      3
      .
      3
      3
      .
      .
      1
      1
      .
      .
      3
      3
      3
      3
      1
      1
      1
      .
      3
      3
      3
      .
      2
      2
      2
      2
      3
      3
      .
      .
      2
      2
      2
      .
      2
      2
      2
      .
      2
      2
      2
      .
      1
      1
      .
      .
      1
      1
      1
      .
      2
      2
      .
      .
      2
      2
      2
      2
      3
      3
      3
      3
      2
      2
      2
      .
      2
      2
      .
      .
      2
      2
      .
      .
      1
      1
      .
      .
      3
      3
      .
      .
      end
      label values isced ISCED_17
      label def ISCED_17 1 "1. niedrig (ISCED 0-2)", modify
      label def ISCED_17 2 "2. mittel (ISCED 3-4)", modify
      label def ISCED_17 3 "3. hoch (ISCED 5-6)", modify
      Is this what you meant?
      Best,
      Lisa

      Comment


      • #4
        almost, can you include in the dataex command the variables you include in the reshape command in #1?

        Comment


        • #5
          Hi Øyvind,
          unfortunately, when I try to include all the variables in the dataex command I receive the following error message:

          input statement exceeds linesize limit. Try specifying fewer variables
          r(1000);

          Therefore, I seperated the variables:

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input byte(part_08 part_11 part_14 part_17) float(partner_08 partner_11 partner_14 partner_17 wave_08 wave_11 wave_14 wave_17) byte(alter_08 alter_11 alter_14 alter_17 exkind_08 exkind_11 exkind_14 exkind_17 anzkind_08 anzkind_11 anzkind_14 anzkind_17)
          2 2 2 0 1 1 1 . 1 1 1 . 59 62 65  . . . . .  0 0 0 .
          2 2 2 2 0 0 0 0 1 1 1 1 68 71 74 77 1 1 1 1  3 3 3 3
          2 2 2 0 1 1 1 . 1 1 1 . 83 86 89  . 1 1 1 .  2 2 2 .
          2 2 0 0 1 1 . . 1 1 . . 74 77  .  . 1 1 . .  1 1 . .
          2 2 2 0 1 1 1 . 1 1 1 . 74 77 80  . . . . .  0 0 0 .
          2 2 0 0 1 1 . . 1 1 . . 89 92  .  . 1 1 . .  1 4 . .
          2 2 0 0 0 0 . . 1 1 . . 88 91  .  . 1 1 . .  4 4 . .
          2 2 2 2 0 0 0 0 1 1 1 1 84 87 90 93 1 1 1 1  2 1 2 2
          2 2 2 0 1 1 1 . 1 1 1 . 85 88 91  . 1 1 1 .  2 2 2 .
          2 2 2 0 1 1 1 . 1 1 1 . 82 85 88  . 1 1 1 .  3 3 3 .
          2 2 2 2 0 0 0 0 1 1 1 1 84 87 90 93 1 1 1 1  2 2 2 1
          2 2 0 0 1 1 . . 1 1 . . 83 86  .  . 1 1 . .  2 1 . .
          2 2 2 0 1 1 1 . 1 1 1 . 70 73 76  . 1 1 1 .  3 3 3 .
          2 2 2 0 0 0 0 . 1 1 1 . 84 87 90  . . . . .  0 0 0 .
          2 2 2 0 0 0 0 . 1 1 1 . 87 90 93  . 1 1 1 .  2 2 2 .
          2 2 0 0 1 0 . . 1 1 . . 79 82  .  . 1 1 . .  2 2 . .
          2 2 2 0 1 1 1 . 1 1 1 . 76 79 82  . 1 1 1 .  3 3 3 .
          2 2 0 0 0 0 . . 1 1 . . 93 95  .  . 1 1 . .  4 4 . .
          2 2 2 2 1 1 1 1 1 1 1 1 67 70 73 76 1 1 1 1  1 1 1 1
          2 2 2 2 0 0 0 0 1 1 1 1 77 80 83 86 1 1 1 1  2 2 2 2
          2 2 2 0 0 0 0 . 1 1 1 . 78 81 84  . 1 1 1 .  3 3 3 .
          2 2 0 0 1 1 . . 1 1 . . 88 91  .  . 1 1 . .  3 3 . .
          2 2 0 0 1 1 . . 1 1 . . 79 82  .  . 1 1 . .  5 5 . .
          2 2 0 0 0 0 . . 1 1 . . 88 91  .  . . . . .  0 0 . .
          2 2 0 0 0 0 . . 1 1 . . 86 89  .  . 1 1 . .  2 1 . .
          2 2 0 0 0 0 . . 1 1 . . 80 83  .  . 1 1 . .  1 1 . .
          2 2 0 0 1 1 . . 1 1 . . 76 79  .  . 1 1 . .  2 2 . .
          2 2 2 0 1 1 1 . 1 1 1 . 84 87 90  . 1 1 1 .  3 3 3 .
          2 2 0 0 1 1 . . 1 1 . . 81 84  .  . 1 1 . .  3 3 . .
          2 2 2 2 1 1 1 1 1 1 1 1 79 82 85 88 1 1 1 1  5 5 5 4
          2 2 2 0 1 1 1 . 1 1 1 . 79 82 85  . 1 1 1 .  1 1 1 .
          2 2 2 0 1 1 1 . 1 1 1 . 68 71 74  . 1 1 1 .  1 1 1 .
          2 2 2 0 0 0 0 . 1 1 1 . 83 86 89  . 1 1 1 .  2 2 2 .
          2 2 2 2 0 0 0 0 1 1 1 1 74 77 80 83 1 1 1 1  2 2 2 2
          2 2 0 0 1 1 . . 1 1 . . 87 90  .  . 1 1 . .  7 7 . .
          2 2 0 0 1 1 . . 1 1 . . 84 87  .  . . . . .  0 0 . .
          2 2 0 0 0 0 . . 1 1 . . 82 85  .  . 1 1 . .  1 1 . .
          2 2 0 0 1 1 . . 1 1 . . 75 78  .  . 1 1 . .  1 1 . .
          2 2 0 0 0 0 . . 1 1 . . 83 86  .  . 1 1 . .  5 4 . .
          2 2 2 0 1 0 0 . 1 1 1 . 80 83 86  . 1 1 1 .  2 2 2 .
          2 2 0 0 1 1 . . 1 1 . . 77 80  .  . 1 1 . .  2 2 . .
          2 2 2 2 1 1 1 1 1 1 1 1 76 79 82 85 1 1 1 1  2 2 2 2
          2 2 2 2 1 0 0 0 1 1 1 1 66 69 72 75 1 1 1 1  2 2 2 2
          2 2 2 2 0 0 0 0 1 1 1 1 79 82 85 88 1 1 1 1  3 3 3 3
          2 2 2 2 1 1 1 1 1 1 1 1 77 80 83 86 1 1 1 1  3 3 3 3
          2 2 2 2 1 1 1 1 1 1 1 1 76 79 82 85 1 1 1 1  4 4 4 4
          2 2 0 0 0 0 . . 1 1 . . 89 92  .  . . . . .  0 0 . .
          2 2 0 0 0 0 . . 1 1 . . 84 87  .  . 1 1 . .  3 3 . .
          2 2 2 2 1 1 1 1 1 1 1 1 84 87 90 93 1 1 1 1  1 1 1 1
          2 2 0 0 1 1 . . 1 1 . . 78 81  .  . 1 1 . .  2 2 . .
          2 2 2 0 0 0 0 . 1 1 1 . 86 89 92  . 1 1 1 .  3 3 3 .
          2 2 0 0 0 0 . . 1 1 . . 84 87  .  . 1 1 . .  2 2 . .
          2 2 0 0 1 1 . . 1 1 . . 84 87  .  . 1 1 . .  2 2 . .
          2 2 0 0 0 0 . . 1 1 . . 83 86  .  . 1 1 . . .f 2 . .
          2 2 2 2 0 0 0 0 1 1 1 1 74 77 80 83 1 1 1 1  2 2 2 2
          2 2 2 2 1 1 1 1 1 1 1 1 73 76 79 85 1 1 1 1  2 2 2 2
          2 2 2 0 0 0 0 . 1 1 1 . 79 82 85  . . . . .  0 0 0 .
          2 2 2 2 0 0 0 0 1 1 1 1 82 85 88 91 1 1 1 1  2 2 2 2
          2 2 0 0 0 0 . . 1 1 . . 83 86  .  . 1 1 . .  2 2 . .
          2 2 0 0 1 1 . . 1 1 . . 77 80  .  . 1 1 . .  3 3 . .
          2 2 2 2 1 1 1 1 1 1 1 1 76 79 82 85 1 1 1 1  2 2 2 2
          2 2 2 2 1 1 1 1 1 1 1 1 73 76 79 82 1 1 1 1  1 1 1 1
          2 2 0 0 1 1 . . 1 1 . . 77 80  .  . 1 1 . .  2 2 . .
          2 2 2 0 1 1 1 . 1 1 1 . 68 71 74  . 1 1 1 .  2 2 2 .
          2 2 0 0 0 0 . . 1 1 . . 84 87  .  . 1 1 . .  1 1 . .
          2 2 2 2 1 1 1 1 1 1 1 1 68 71 74 77 1 1 1 1  3 3 3 3
          2 2 0 0 1 1 . . 1 1 . . 71 74  .  . . . . .  0 0 . .
          2 2 0 0 0 0 . . 1 1 . . 73 76  .  . 1 1 . .  1 1 . .
          2 2 2 2 1 1 1 1 1 1 1 1 70 73 76 79 1 1 1 1  1 1 1 1
          2 2 0 0 1 1 . . 1 1 . . 83 86  .  . 1 1 . .  2 2 . .
          2 2 2 2 1 1 1 1 1 1 1 1 75 78 81 84 1 1 1 1  2 2 2 2
          2 2 2 2 1 1 1 0 1 1 1 1 73 76 79 82 1 1 1 1  2 2 2 2
          2 2 0 0 1 1 . . 1 1 . . 76 79  .  . 1 1 . .  1 1 . .
          2 2 0 0 1 1 . . 1 1 . . 68 71  .  . . . . .  0 0 . .
          2 2 0 0 1 1 . . 1 1 . . 71 74  .  . 1 1 . .  1 1 . .
          2 2 2 0 0 0 0 . 1 1 1 . 85 88 91  . 1 1 1 .  2 2 2 .
          2 2 0 0 1 0 . . 1 1 . . 84 87  .  . 1 1 . .  2 2 . .
          2 2 0 0 0 0 . . 1 1 . . 77 80  .  . 1 1 . .  2 2 . .
          2 2 2 2 1 1 1 1 1 1 1 1 71 74 77 80 1 1 1 1  4 2 4 4
          2 2 0 0 1 1 . . 1 1 . . 68 71  .  . 1 1 . .  2 2 . .
          2 2 2 2 1 1 1 1 1 1 1 1 78 81 84 87 1 1 1 1  2 3 4 4
          2 2 0 0 0 0 . . 1 1 . . 85 88  .  . . . . .  0 0 . .
          2 2 0 0 1 1 . . 1 1 . . 78 81  .  . . . . .  0 0 . .
          2 2 0 0 1 1 . . 1 1 . . 70 73  .  . . . . .  0 0 . .
          2 2 0 0 0 0 . . 1 1 . . 81 84  .  . 1 1 . .  1 1 . .
          2 2 2 2 1 1 1 1 1 1 1 1 78 81 84 87 1 1 1 1  2 2 2 2
          2 2 2 0 1 1 1 . 1 1 1 . 76 79 82  . 1 1 1 .  2 2 2 .
          2 2 2 0 1 1 1 . 1 1 1 . 68 71 74  . 1 1 1 .  2 2 2 .
          2 2 0 0 1 1 . . 1 1 . . 81 84  .  . 1 1 . .  3 3 . .
          2 2 2 2 0 0 0 0 1 1 1 1 79 82 85 88 1 1 1 1  2 2 3 3
          2 2 2 2 1 1 1 1 1 1 1 1 59 62 65 68 1 1 1 1  3 3 3 3
          2 2 2 2 0 0 0 0 1 1 1 1 78 81 84 87 1 1 1 1  4 4 3 2
          2 2 0 0 0 0 . . 1 1 . . 83 86  .  . 1 1 . .  6 5 . .
          2 2 2 2 1 1 1 1 1 1 1 1 70 73 76 79 1 1 1 1  1 1 1 1
          2 2 2 2 1 1 1 0 1 1 1 1 67 70 73 76 1 1 1 1  5 5 5 1
          2 2 2 2 1 1 1 1 1 1 1 1 65 68 71 74 1 1 1 1  1 1 1 1
          2 2 2 2 1 0 0 0 1 1 1 1 62 65 68 71 1 1 1 1  1 1 1 1
          2 2 0 0 1 1 . . 1 1 . . 85 88  .  . 1 1 . .  2 2 . .
          2 2 0 0 0 0 . . 1 1 . . 85 88  .  . 1 1 . .  2 2 . .
          2 2 2 0 1 1 1 . 1 1 1 . 84 87 90  . 1 1 1 .  2 2 2 .
          end
          label values part_08 PART_08
          label def PART_08 2 "2. Panelteilnehmer 2008", modify
          label values part_11 PART_11
          label def PART_11 2 "2. Panelteilnehmer 2011", modify
          label values part_14 PART_14
          label def PART_14 0 "0. 0 keine Teilnahme in 2014", modify
          label def PART_14 2 "2.  2 Panelteilnehmer 2014", modify
          label values part_17 PART_17
          label def PART_17 0 "0. 0 keine Teilnahme in 2017", modify
          label def PART_17 2 "2. 2 Panelteilnehmer in 2017", modify
          label values alter_08 ALTER_08
          label def ALTER_08 93 "93. 90-96", modify
          label values alter_11 ALTER_11
          label def ALTER_11 95 "95. 93-98", modify
          label values alter_14 ALTER_14
          label values alter_17 ALTER_17
          label values exkind_08 EXKIND_1
          label values exkind_11 EXKIND_1
          label values exkind_14 EXKIND_1
          label values exkind_17 EXKIND_1
          label def EXKIND_1 1 "1. ja", modify
          label values anzkind_08 ANZKIND
          label values anzkind_11 ANZKIND
          label values anzkind_14 ANZKIND
          label values anzkind_17 ANZKIND
          label def ANZKIND 0 "0. keine", modify

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input byte(wekind_08 wekind_11 wekind_14 wekind_17) long hheink_08 double hheink_11 long(hheink_14 hheink_17) double(aee_oecd_08 aee_oecd_11 aee_oecd_14 aee_oecd_17)
          .c .c .c . 2225 1200 1250    . 1483.3333333333333                800  833.3333333333334                  .
           2  3  3 3  900  900 1000 1300                900                900               1000               1300
           3  3  3 . 5000 5550 5500    . 3333.3333333333335               3700 3666.6666666666665                  .
           2  2  . . 2600 3055    .    . 1733.3333333333333 2036.6666666666667                  .                  .
          .c .c .c . 2300 2000 2000    . 1533.3333333333333 1333.3333333333333 1333.3333333333333                  .
           6  4  . .   .f   .f    .    .                 .f                 .f                  .                  .
           2  2  . .  800 1100    .    .                800               1100                  .                  .
           4  4  3 3 1029  790 1575 1000               1029                790               1575               1000
           5  5  6 . 1800 1900 2500    .               1200 1266.6666666666667 1666.6666666666667                  .
           5  5  5 . 1875 2125 2800    .               1250 1416.6666666666667 1866.6666666666667                  .
           2  2  2 2 2000 1800 2000 2300               2000               1800               2000               2300
           4  5  . .   .f 4000    .    .                 .f 2666.6666666666665                  .                  .
           4  4  4 . 2000 2200 2200    . 1333.3333333333333 1466.6666666666667 1466.6666666666667                  .
          .c .c .c . 1500 1647 1100    .               1500               1647               1100                  .
           3  3  3 . 1300 1350 1400    .               1300               1350               1400                  .
           1  1  . .  680   .f    .    .                272                 .f                  .                  .
           5  5  5 . 2500 2500 3000    . 1666.6666666666667 1666.6666666666667               2000                  .
           2  2  . .  600  328    .    .                600                328                  .                  .
           5  5  5 5 3920 1810 1900   .a 2613.3333333333335 1206.6666666666667 1266.6666666666667                 .f
           4  4  4 4 1225 1200 1300 1563               1225               1200               1300               1563
           5  5  5 . 1400 1550 1500    .               1400               1550               1500                  .
           5  4  . .   .f 1750    .    .                 .f 1166.6666666666667                  .                  .
           5  5  . . 1595 1600    .    . 1063.3333333333333 1066.6666666666667                  .                  .
          .c .c  . .  700  527    .    .                700                527                  .                  .
           6  5  . . 1375 1407    .    .               1375               1407                  .                  .
           4  4  . .  988 1010    .    .                988               1010                  .                  .
           6  4  . .   .f   .f    .    .                 .f                 .f                  .                  .
           3  3  3 . 1500 1550 1650    .               1000 1033.3333333333333               1100                  .
           4  2  . . 2875 3500    .    . 1916.6666666666667 2333.3333333333335                  .                  .
           3  5  5 1   .f 4500 5000   .a                 .f               3000 3333.3333333333335                 .f
           4  4  4 . 2500   .f 3000    . 1666.6666666666667                 .f               2000                  .
           1  2  1 . 2150 2200 2200    .  693.5483870967743 1466.6666666666667                880                  .
           7  6  5 .  824  869  800    .                824                869                800                  .
           3  3  3 3  820  882  801  984                820                882                801                984
           5  4  . . 1360 1200    .    .  906.6666666666666                800                  .                  .
          .c .c  . . 4750 4100    .    . 3166.6666666666665 2733.3333333333335                  .                  .
           2  4  . . 2000 1900    .    .               2000               1900                  .                  .
           5  5  . . 2000 2100    .    . 1333.3333333333333               1400                  .                  .
           4  4  . . 1330 1400    .    .               1330               1400                  .                  .
           4  4  4 . 4901 2840 3000    . 3267.3333333333335               2840               3000                  .
           3  5  . . 2300 4420    .    . 1533.3333333333333 2946.6666666666665                  .                  .
           5  5  5 5 2100 2200 2400 2700               1400 1466.6666666666667               1600               1800
           3  2  2 2 2500 3600 2000 2125 1666.6666666666667               2400 1333.3333333333333 1416.6666666666667
           4  3  4 3 1625 1900 1900 2000               1625               1900               1900               2000
           3  3  3 3 8000 6000 6450 4500  5333.333333333333               4000               4300               3000
           2  2  2 2 1400 1800 2000 2000                700               1200 1333.3333333333333 1333.3333333333333
          .c .c  . . 1000 2000    .    .               1000               2000                  .                  .
           5  5  . . 1300 1350    .    .               1300               1350                  .                  .
           6  6  6 6 2000 2500 2500 2600 1333.3333333333333 1666.6666666666667 1666.6666666666667 1733.3333333333333
           4  5  . . 2000 1700    .    . 1333.3333333333333 1133.3333333333333                  .                  .
           4  4  4 . 2000 1900 2500    .               2000               1900               2500                  .
           4  4  . . 1600 1625    .    .               1600               1625                  .                  .
           4  3  . . 1800 1800    .    .               1200               1200                  .                  .
          .f  4  . . 1700 1700    .    .               1700               1700                  .                  .
           2  3  3 3 1000 1000 1000 1200               1000               1000               1000               1200
           3  4  4 4   .f 2000 2000 2375                 .f 1333.3333333333333 1333.3333333333333 1583.3333333333333
          .c .c .c . 1300 1300 2300    .               1300               1300               2300                  .
           3  4  4 3 1500 1500 1500 1600               1500               1500               1500               1600
           4  4  . . 2400 2400    .    .               1500               1500                  .                  .
           2  2  . . 1375 1875    .    .  916.6666666666666               1250                  .                  .
           3  3  3 4 3140 1375 1400 1800 2093.3333333333335  916.6666666666666  933.3333333333334               1200
           5  5  5 5 1650 1400 2000 2100               1100  933.3333333333334 1333.3333333333333               1400
           4  4  . . 3200 2500    .    . 2133.3333333333335 1666.6666666666667                  .                  .
           5  5  5 . 2500 2500   .f    . 1666.6666666666667 1666.6666666666667                 .f                  .
           3  3  . . 1700 1400    .    .               1700               1400                  .                  .
           5  5  5 5 2200 2900 4000 3800 1466.6666666666667 1933.3333333333333 2666.6666666666665 2533.3333333333335
          .c .c  . . 1800 1800    .    .               1200               1200                  .                  .
           4  4  . . 2500 2400    .    . 1666.6666666666667               1600                  .                  .
           4  4  4 4 1500 1700 1700 1600               1000 1133.3333333333333 1133.3333333333333 1066.6666666666667
           5  5  . . 2100 2200    .    .               1400 1466.6666666666667                  .                  .
           5  4  4 4 1500 2000 2400 2600               1000 1333.3333333333333               1600 1733.3333333333333
           6  6  6 6 4100 4700 4463 2875 2733.3333333333335 3133.3333333333335 2975.3333333333335               2875
           2  4  . . 1360 1180    .    .  906.6666666666666  786.6666666666666                  .                  .
          .c .c  . . 2400 2500    .    .               1600 1666.6666666666667                  .                  .
           5  5  . . 1300 1500    .    .  866.6666666666666               1000                  .                  .
           5  4  4 . 1400 1375 1500    .               1400               1375               1500                  .
           5  5  . . 2000 1400    .    . 1333.3333333333333               1400                  .                  .
           2  3  . . 1000 1875    .    .               1000               1875                  .                  .
           4  3  3 3 4784 5180 5090 4500 3189.3333333333335 3453.3333333333335 3393.3333333333335               3000
           3  5  . . 2375 2700    .    . 1583.3333333333333               1800                  .                  .
           3  5  4 5 1200 2400 2550 2800                800               1600               1700 1866.6666666666667
          .c .c  . . 2000 1625    .    .               2000               1625                  .                  .
          .c .c  . . 2500 4900    .    . 1666.6666666666667               4900                  .                  .
          .c .c  . . 1875 2000    .    .               1250 1333.3333333333333                  .                  .
           2  2  . . 1200  875    .    .  923.0769230769231                875                  .                  .
           4  4  4 4 1900 1625 1600 2000 1266.6666666666667 1083.3333333333333 1066.6666666666667 1333.3333333333333
           5  5  5 . 1650 1500 1625    .               1100               1000 1083.3333333333333                  .
           1  4  5 . 5750 6500 6000    .               2875  4333.333333333333               4000                  .
           4  1  . . 1375 1500    .    .  916.6666666666666               1000                  .                  .
           5  4  4 4 1000 2500 2000 1500  666.6666666666666               2500               2000               1500
           3  3  3 3   .f 2100 2200 2400                 .f               1400 1466.6666666666667               1600
           5  4  5 3 1100 1100 1000 1250               1100               1100               1000               1250
           2  4  . .   .f   .f    .    .                 .f                 .f                  .                  .
           6  6  6 6 1500 1800 2200 2300               1000               1200 1466.6666666666667 1533.3333333333333
           4  4  5 6 1800 2100 1300 1200               1200               1400               1300               1200
           5  4  5 5 2500 3000 4500 3000               1250               1500               2250               2000
           1  1  1 1  750 1310 1500 2000                375  873.3333333333334               1000 1333.3333333333333
           6  6  . . 1900 2000    .    . 1266.6666666666667 1333.3333333333333                  .                  .
           5  3  . .   .f   .f    .    .                 .f                 .f                  .                  .
           2  3  3 . 2300 2700 4118    . 1533.3333333333333               1800 2745.3333333333335                  .
          end
          label values wekind_08 WEKIND_0
          label def WEKIND_0 1 "1. im selben Haushalt", modify
          label def WEKIND_0 2 "2. im selben Haus (anderer Haushalt)", modify
          label def WEKIND_0 3 "3. in der Nachbarschaft", modify
          label def WEKIND_0 4 "4. im gleichen Ort", modify
          label def WEKIND_0 5 "5. anderer Ort, innerhalb 2 Stunden", modify
          label def WEKIND_0 6 "6. weiter entfernt, in Deutschland", modify
          label def WEKIND_0 7 "7. weiter entfernt, im Ausland", modify
          label values wekind_11 WEKIND_1
          label values wekind_14 WEKIND_1
          label values wekind_17 WEKIND_1
          label def WEKIND_1 1 "1. im selben Haushalt", modify
          label def WEKIND_1 2 "2. im selben Haus (anderer Haushalt)", modify
          label def WEKIND_1 3 "3. in der Nachbarschaft", modify
          label def WEKIND_1 4 "4. im gleichen Ort", modify
          label def WEKIND_1 5 "5. and. Ort in Dtl., innerhalb 2 Stunden", modify
          label def WEKIND_1 6 "6. and. Ort in Dtl., weiter entfernt", modify
          label def WEKIND_1 .c ".c. -3 Ueberfiltert", modify
          label values hheink_08 HHEINK_0
          label values hheink_11 HHEINK_1
          label values hheink_14 HHEINK_1
          label values hheink_17 HHEINK_1
          label def HHEINK_1 .f ".f. -6 Keine Angabe", modify
          label def HHEINK_1 .a ".a. -1 Verweigert", modify
          label values aee_oecd_08 AEE_OECD
          label values aee_oecd_11 AEE_OECD
          label values aee_oecd_14 AEE_OECD
          label values aee_oecd_17 AEE_OECD

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input float(sum_helpfromchildren_08 sum_helpfromchildren_11 sum_helpfromchildren_14 sum_helpfromchildren_17 srh_08 srh_11 srh_14 srh_17 numphy_08 numphy_11 numphy_14 numphy_17 cesd_08 cesd_11 cesd_14 cesd_17 partner_08 partner_11 partner_14 partner_17)
          0 0  0 . 5 4 4 .  0  0  1  .    0         1         0  . 1 1 1 .
          0 0  1 0 3 4 4 4  5  7  6  6   11        12         4 14 0 0 0 0
          0 0  0 . 4 3 2 .  6  5  6  .    3         2         9  . 1 1 1 .
          0 0  . . 4 3 . .  5  3  .  .    0         1         .  . 1 1 . .
          0 0  0 . 3 3 3 . .f  3  0  .    8         3         5  . 1 1 1 .
          0 0  . . 2 1 . .  5 .f  .  .    0        23         .  . 1 1 . .
          0 0  . . 2 2 . .  3  1  .  .   14 13.846154         .  . 0 0 . .
          1 1  1 1 2 3 3 3  5  6  7 .f   18        21        17 28 0 0 0 0
          1 0  1 . 2 3 1 . .f  4 .e  .   16         6        15  . 1 1 1 .
          0 0  0 . 4 3 3 .  3  4  2  .    0         1         3  . 1 1 1 .
          0 0  0 0 3 3 3 3  4  7  4  6   14        10         4  5 0 0 0 0
          0 0  . . 4 3 . .  2  4  .  .   14        10         .  . 1 1 . .
          0 0  1 . 3 4 4 .  2 .e  3  .    3         4         7  . 1 1 1 .
          0 0  0 . 4 3 3 .  7 .e .e  .    1 12.692307        11  . 0 0 0 .
          0 1  1 . 3 4 4 . .f  5 .e  .   10         6         8  . 0 0 0 .
          0 0  . . 2 2 . .  6 .e  .  .   14        21         .  . 1 0 . .
          0 0  1 . 4 3 3 .  3  5  6  .    5        14         8  . 1 1 1 .
          1 1  . . 3 3 . . .f .e  .  .    6        15         .  . 0 0 . .
          1 0  0 0 4 4 3 4  5  5  6 .e    6         2        23  8 1 1 1 1
          0 1 .a 1 3 4 3 2 .f  5  4 .e   10         9        11  7 0 0 0 0
          0 0  0 . 3 3 2 .  7  6  5  .   10         8         4  . 0 0 0 .
          0 0  . . 3 1 . . 10 .e  .  .   10 23.076923         .  . 1 1 . .
          0 1  . . 4 4 . .  2 .e  .  .    2         6         .  . 1 1 . .
          0 0  . . 3 4 . .  2  4  .  .   10         9         .  . 0 0 . .
          0 0  . . 4 4 . .  3  2  .  .    3         3         .  . 0 0 . .
          0 0  . . 3 3 . .  4  3  .  .    9         8         .  . 0 0 . .
          0 0  . . 4 2 . .  4  3  .  .    2        19         .  . 1 1 . .
          0 1  1 . 4 4 3 .  2  2  1  .    3         2         5  . 1 1 1 .
          0 1  . . 4 3 . .  4  4  .  .    5         5         .  . 1 1 . .
          0 0  0 1 4 4 4 4  0  1  3  2    3         5         4  6 1 1 1 1
          0 1  0 . 5 5 4 .  2  1  1  .    1         5         0  . 1 1 1 .
          0 0  0 . 4 4 4 .  1  2  2  .    2         7         3  . 1 1 1 .
          0 0  0 . 5 4 4 .  1  4  2  .    0         1         4  . 0 0 0 .
          0 0  0 0 4 2 4 4  1  1  2  3    3        12  26.53846  8 0 0 0 0
          0 0  . . 2 2 . .  2  3  .  .    6        15         .  . 1 1 . .
          0 0  . . 4 4 . .  3  3  .  .    4         6         .  . 1 1 . .
          0 1  . . 4 3 . .  5  5  .  .    4  4.285714         .  . 0 0 . .
          0 0  . . 2 2 . .  5  5  .  .   30        18         .  . 1 1 . .
          0 0  . . 4 4 . . .f  1  .  .    1         5         .  . 0 0 . .
          0 0  1 . 4 4 3 .  2  2  3  .    2         4         5  . 1 0 0 .
          0 0  . . 3 2 . .  2  2  .  .    0         2         .  . 1 1 . .
          0 0  0 0 3 3 4 3  4  2  1  5   11        20         4  2 1 1 1 1
          0 0  0 0 3 4 3 3  2  0  2  3   18        16         8  3 1 0 0 0
          0 0  1 0 3 4 3 3  6  4  6  7    5         9        12  5 0 0 0 0
          0 0  0 1 2 2 3 2  1  2  2  2    2         6         6  5 1 1 1 1
          0 0  0 0 4 4 3 4  3  3  2  3    0         0         4  4 1 1 1 1
          0 0  . . 4 4 . .  4  1  .  .    5         3         .  . 0 0 . .
          0 0  . . 2 3 . .  3 .e  .  .   10         6         .  . 0 0 . .
          0 0  0 0 2 2 3 1 .f  2 .e  1   14         6        12 15 1 1 1 1
          0 0  . . 4 3 . .  6  3  .  .    7        16         .  . 1 1 . .
          0 0  0 . 4 3 3 .  3  3 .e  .    1         4         5  . 0 0 0 .
          1 1  . . 3 3 . . .f .e  .  .   21        10         .  . 0 0 . .
          1 1  . . 4 3 . .  5  5  .  .    7         5         .  . 1 1 . .
          1 1  . . 3 3 . .  3  5  .  . 3.75         3         .  . 0 0 . .
          0 0  0 0 5 5 5 5  5  1  5  3    4         3         1  5 0 0 0 0
          0 0  0 0 5 5 3 3  0  1  0  2    2         5         3 16 1 1 1 1
          0 0  0 . 3 3 3 .  7  5  5  .    6        11 3.2142856  . 0 0 0 .
          0 1  0 0 3 2 3 3  2  3  5 .f   11         7         9 16 0 0 0 0
          0 0  . . 4 4 . .  1  4  .  .    2         1         .  . 0 0 . .
          0 1  . . 2 2 . .  5  6  .  .   19        19         .  . 1 1 . .
          0 0  0 0 3 3 4 4  6 .e .e  7    2         1         4  2 1 1 1 1
          0 0  0 0 4 4 4 4  5  4 .e  2   25         8        10  5 1 1 1 1
          1 0  . . 3 3 . .  5 .e  .  .    5         3         .  . 1 1 . .
          0 0  0 . 5 5 4 .  1  2 .e  .    2         4         2  . 1 1 1 .
          0 1  . . 3 4 . .  4  4  .  .   12        11         .  . 0 0 . .
          0 0  0 0 3 3 3 3  4  4  5  7    6        11         6 13 1 1 1 1
          0 0  . . 4 3 . .  1  4  .  .    6        15         .  . 1 1 . .
          0 0  . . 3 4 . . .f  1  .  .    2         0         .  . 0 0 . .
          0 0  0 0 3 3 4 3  5  5  6  3    6         8         7  9 1 1 1 1
          0 0  . . 3 2 . .  1  2  .  .    1         2         .  . 1 1 . .
          0 0  0 0 3 3 3 3  6  8  8  6    5         6         9  8 1 1 1 1
          0 0  0 0 4 3 4 4  2  3  1  2    7         2         3  9 1 1 1 0
          0 0  . . 5 3 . .  0  2  .  .    0         3         .  . 1 1 . .
          0 0  . . 1 1 . .  7 .e  .  .    4        23         .  . 1 1 . .
          0 0  . . 3 3 . .  2  7  .  .   16        12         .  . 1 1 . .
          1 1  1 . 4 4 4 . .f .e .e  .   12         3         3  . 0 0 0 .
          1 0  . . 3 3 . . .f  4  .  .    6         5         .  . 1 0 . .
          1 0  . . 4 4 . .  0  0  .  .    4         8         .  . 0 0 . .
          0 0  1 0 3 3 3 3  5  5  5  6   11         6         7  7 1 1 1 1
          0 0  . . 4 4 . . .f .e  .  .    6         5         .  . 1 1 . .
          0 0  0 0 3 4 3 4  2  2  4  2    5         3         5  3 1 1 1 1
          0 0  . . 3 2 . .  4 .e  .  .   16        15         .  . 0 0 . .
          0 0  . . 4 4 . .  2  2  .  .    2         8         .  . 1 1 . .
          0 0  . . 2 3 . .  3  3  .  .    5         7         .  . 1 1 . .
          0 0  . . 4 3 . . .f  2  .  .    4         3         .  . 0 0 . .
          0 0  0 0 3 3 3 3  2  3  3  3    9         3         3 11 1 1 1 1
          0 0  0 . 3 3 3 .  4  2  4  .    2         8         6  . 1 1 1 .
          0 0  0 . 4 4 4 .  3  2  4  .    4        14         7  . 1 1 1 .
          0 0  . . 3 3 . .  4 .g  .  .   18        13         .  . 1 1 . .
          0 0  0 0 4 5 4 4  3 .e  0  4    2         0         2  3 0 0 0 0
          1 1  1 0 3 2 3 3 .f  2 .e  2    0         1         1  1 1 1 1 1
          0 0  0 0 5 5 5 5  3  4  3 .e    1         0         3 11 0 0 0 0
          0 0  . . 4 3 . . .f .e  .  .   15  5.357143         .  . 0 0 . .
          0 0  0 0 3 3 4 3  3 .e  2  3    8         9         7 14 1 1 1 1
          0 0  0 0 4 4 4 4  1  1  2  2   13         6         7  6 1 1 1 0
          0 0  0 0 3 3 3 3  3  4  4  2    2         8        14  5 1 1 1 1
          0 0  0 0 3 3 3 4  1  1  0  1    5         3         2  5 1 0 0 0
          0 1  . . 3 3 . .  3  2  .  .    2         6         .  . 1 1 . .
          0 0  . . 1 3 . .  4 .e  .  .   18        17         .  . 0 0 . .
          0 0  0 . 2 2 3 .  3  6  8  .    2  6.428571         6  . 1 1 1 .
          end

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input byte(isced_08 isced_11 isced_14 isced_17)
          3 3 3 .
          2 2 2 2
          2 2 2 .
          2 2 . .
          3 3 3 .
          3 3 . .
          1 1 . .
          3 3 3 3
          1 1 1 .
          3 3 3 .
          2 2 2 2
          3 3 . .
          2 2 2 .
          2 2 2 .
          2 2 2 .
          1 1 . .
          1 1 1 .
          2 2 . .
          2 2 2 2
          3 3 3 3
          2 2 2 .
          2 2 . .
          2 2 . .
          1 1 . .
          3 3 . .
          2 2 . .
          3 3 . .
          3 3 3 .
          2 2 . .
          3 3 3 3
          3 3 3 .
          3 3 3 .
          1 1 1 .
          1 1 1 1
          1 1 . .
          3 3 . .
          3 3 . .
          2 2 . .
          3 3 . .
          2 2 2 .
          1 1 . .
          2 2 2 2
          2 2 2 2
          1 1 1 1
          2 2 2 2
          3 3 3 3
          2 2 . .
          2 2 . .
          3 3 3 3
          2 2 . .
          2 2 2 .
          2 2 . .
          2 2 . .
          2 2 . .
          1 1 1 1
          2 2 2 2
          1 1 1 .
          1 1 1 1
          3 3 . .
          2 2 . .
          1 1 1 1
          2 2 2 2
          2 2 . .
          2 2 2 .
          2 2 . .
          2 2 2 2
          2 2 . .
          2 2 . .
          3 3 3 3
          2 2 . .
          2 2 2 2
          3 3 3 3
          1 1 . .
          1 1 . .
          1 1 . .
          1 1 1 .
          2 2 . .
          2 2 . .
          3 3 3 3
          2 2 . .
          2 2 2 2
          3 3 . .
          3 3 . .
          2 2 . .
          2 2 . .
          2 2 2 2
          3 3 3 .
          3 3 3 .
          2 2 . .
          2 2 2 2
          3 3 3 3
          1 1 1 1
          3 3 . .
          2 2 2 2
          2 2 2 2
          1 1 1 1
          2 2 2 2
          2 2 . .
          3 3 . .
          3 3 3 .
          end
          label values isced_08 ISCED_08
          label def ISCED_08 1 "1. niedrig (ISCED 0-2)", modify
          label def ISCED_08 2 "2. mittel (ISCED 3-4)", modify
          label def ISCED_08 3 "3. hoch (ISCED 5-6)", modify
          label values isced_11 ISCED_11
          label def ISCED_11 1 "1. niedrig (ISCED 0-2)", modify
          label def ISCED_11 2 "2. mittel (ISCED 3-4)", modify
          label def ISCED_11 3 "3. hoch (ISCED 5-6)", modify
          label values isced_14 ISCED_14
          label def ISCED_14 1 "1. niedrig (ISCED 0-2)", modify
          label def ISCED_14 2 "2. mittel (ISCED 3-4)", modify
          label def ISCED_14 3 "3. hoch (ISCED 5-6)", modify
          label values isced_17 ISCED_17
          label def ISCED_17 1 "1. niedrig (ISCED 0-2)", modify
          label def ISCED_17 2 "2. mittel (ISCED 3-4)", modify
          label def ISCED_17 3 "3. hoch (ISCED 5-6)", modify
          Is this helpful?
          Thanks again for the help.
          Best,
          Lisa

          Comment


          • #6
            unfortunately, I am not able to replicate the problem, the variables all reshape correctly. what happens if you run the reshape command in #1 on the first 100 observations, i.e.,
            Code:
            keep in 1/100
            reshape long part wave alter exkind anzkind wekind hheink aee_oecd ///
            help sum_helpfromchildren srh numphy cesd partner isced, ///
            i(fallnum) j(year, string)
            ?

            Comment


            • #7
              this is what happens:

              Code:
              * Example generated by -dataex-. For more info, type help dataex
              clear
              input byte part float(partner wave) byte(alter exkind anzkind)
              2 1 1 59 . 0
              2 1 1 62 . 0
              2 1 1 65 . 0
              0 . .  . . .
              2 0 1 68 1 3
              2 0 1 71 1 3
              2 0 1 74 1 3
              2 0 1 77 1 3
              2 1 1 83 1 2
              2 1 1 86 1 2
              2 1 1 89 1 2
              0 . .  . . .
              2 1 1 74 1 1
              2 1 1 77 1 1
              0 . .  . . .
              0 . .  . . .
              2 1 1 74 . 0
              2 1 1 77 . 0
              2 1 1 80 . 0
              0 . .  . . .
              2 1 1 89 1 1
              2 1 1 92 1 4
              0 . .  . . .
              0 . .  . . .
              2 0 1 88 1 4
              2 0 1 91 1 4
              0 . .  . . .
              0 . .  . . .
              2 0 1 84 1 2
              2 0 1 87 1 1
              2 0 1 90 1 2
              2 0 1 93 1 2
              2 1 1 85 1 2
              2 1 1 88 1 2
              2 1 1 91 1 2
              0 . .  . . .
              2 1 1 82 1 3
              2 1 1 85 1 3
              2 1 1 88 1 3
              0 . .  . . .
              2 0 1 84 1 2
              2 0 1 87 1 2
              2 0 1 90 1 2
              2 0 1 93 1 1
              2 1 1 83 1 2
              2 1 1 86 1 1
              0 . .  . . .
              0 . .  . . .
              2 1 1 70 1 3
              2 1 1 73 1 3
              2 1 1 76 1 3
              0 . .  . . .
              2 0 1 84 . 0
              2 0 1 87 . 0
              2 0 1 90 . 0
              0 . .  . . .
              2 0 1 87 1 2
              2 0 1 90 1 2
              2 0 1 93 1 2
              0 . .  . . .
              2 1 1 79 1 2
              2 0 1 82 1 2
              0 . .  . . .
              0 . .  . . .
              2 1 1 76 1 3
              2 1 1 79 1 3
              2 1 1 82 1 3
              0 . .  . . .
              2 0 1 93 1 4
              2 0 1 95 1 4
              0 . .  . . .
              0 . .  . . .
              2 1 1 67 1 1
              2 1 1 70 1 1
              2 1 1 73 1 1
              2 1 1 76 1 1
              2 0 1 77 1 2
              2 0 1 80 1 2
              2 0 1 83 1 2
              2 0 1 86 1 2
              2 0 1 78 1 3
              2 0 1 81 1 3
              2 0 1 84 1 3
              0 . .  . . .
              2 1 1 88 1 3
              2 1 1 91 1 3
              0 . .  . . .
              0 . .  . . .
              2 1 1 79 1 5
              2 1 1 82 1 5
              0 . .  . . .
              0 . .  . . .
              2 0 1 88 . 0
              2 0 1 91 . 0
              0 . .  . . .
              0 . .  . . .
              2 0 1 86 1 2
              2 0 1 89 1 1
              0 . .  . . .
              0 . .  . . .
              end
              label values part PART_17
              label def PART_17 0 "0. 0 keine Teilnahme in 2017", modify
              label def PART_17 2 "2. 2 Panelteilnehmer in 2017", modify
              label values alter ALTER_17
              label values exkind EXKIND_1
              label def EXKIND_1 1 "1. ja", modify
              label values anzkind ANZKIND
              label def ANZKIND 0 "0. keine", modify

              Code:
              * Example generated by -dataex-. For more info, type help dataex
              clear
              input byte wekind double(hheink aee_oecd)
              .c 2225 1483.3333333333333
              .c 1200                800
              .c 1250  833.3333333333334
               .    .                  .
               2  900                900
               3  900                900
               3 1000               1000
               3 1300               1300
               3 5000 3333.3333333333335
               3 5550               3700
               3 5500 3666.6666666666665
               .    .                  .
               2 2600 1733.3333333333333
               2 3055 2036.6666666666667
               .    .                  .
               .    .                  .
              .c 2300 1533.3333333333333
              .c 2000 1333.3333333333333
              .c 2000 1333.3333333333333
               .    .                  .
               6   .f                 .f
               4   .f                 .f
               .    .                  .
               .    .                  .
               2  800                800
               2 1100               1100
               .    .                  .
               .    .                  .
               4 1029               1029
               4  790                790
               3 1575               1575
               3 1000               1000
               5 1800               1200
               5 1900 1266.6666666666667
               6 2500 1666.6666666666667
               .    .                  .
               5 1875               1250
               5 2125 1416.6666666666667
               5 2800 1866.6666666666667
               .    .                  .
               2 2000               2000
               2 1800               1800
               2 2000               2000
               2 2300               2300
               4   .f                 .f
               5 4000 2666.6666666666665
               .    .                  .
               .    .                  .
               4 2000 1333.3333333333333
               4 2200 1466.6666666666667
               4 2200 1466.6666666666667
               .    .                  .
              .c 1500               1500
              .c 1647               1647
              .c 1100               1100
               .    .                  .
               3 1300               1300
               3 1350               1350
               3 1400               1400
               .    .                  .
               1  680                272
               1   .f                 .f
               .    .                  .
               .    .                  .
               5 2500 1666.6666666666667
               5 2500 1666.6666666666667
               5 3000               2000
               .    .                  .
               2  600                600
               2  328                328
               .    .                  .
               .    .                  .
               5 3920 2613.3333333333335
               5 1810 1206.6666666666667
               5 1900 1266.6666666666667
               5   .a                 .f
               4 1225               1225
               4 1200               1200
               4 1300               1300
               4 1563               1563
               5 1400               1400
               5 1550               1550
               5 1500               1500
               .    .                  .
               5   .f                 .f
               4 1750 1166.6666666666667
               .    .                  .
               .    .                  .
               5 1595 1063.3333333333333
               5 1600 1066.6666666666667
               .    .                  .
               .    .                  .
              .c  700                700
              .c  527                527
               .    .                  .
               .    .                  .
               6 1375               1375
               5 1407               1407
               .    .                  .
               .    .                  .
              end
              label values wekind WEKIND_1
              label def WEKIND_1 1 "1. im selben Haushalt", modify
              label def WEKIND_1 2 "2. im selben Haus (anderer Haushalt)", modify
              label def WEKIND_1 3 "3. in der Nachbarschaft", modify
              label def WEKIND_1 4 "4. im gleichen Ort", modify
              label def WEKIND_1 5 "5. and. Ort in Dtl., innerhalb 2 Stunden", modify
              label def WEKIND_1 6 "6. and. Ort in Dtl., weiter entfernt", modify
              label def WEKIND_1 .c ".c. -3 Ueberfiltert", modify
              label values hheink HHEINK_1
              label def HHEINK_1 .a ".a. -1 Verweigert", modify
              label def HHEINK_1 .f ".f. -6 Keine Angabe", modify
              label values aee_oecd AEE_OECD

              Code:
              * Example generated by -dataex-. For more info, type help dataex
              clear
              input float(sum_helpfromchildren srh numphy cesd partner)
               0 5  0         0 1
               0 4  0         1 1
               0 4  1         0 1
               . .  .         . .
               0 3  5        11 0
               0 4  7        12 0
               1 4  6         4 0
               0 4  6        14 0
               0 4  6         3 1
               0 3  5         2 1
               0 2  6         9 1
               . .  .         . .
               0 4  5         0 1
               0 3  3         1 1
               . .  .         . .
               . .  .         . .
               0 3 .f         8 1
               0 3  3         3 1
               0 3  0         5 1
               . .  .         . .
               0 2  5         0 1
               0 1 .f        23 1
               . .  .         . .
               . .  .         . .
               0 2  3        14 0
               0 2  1 13.846154 0
               . .  .         . .
               . .  .         . .
               1 2  5        18 0
               1 3  6        21 0
               1 3  7        17 0
               1 3 .f        28 0
               1 2 .f        16 1
               0 3  4         6 1
               1 1 .e        15 1
               . .  .         . .
               0 4  3         0 1
               0 3  4         1 1
               0 3  2         3 1
               . .  .         . .
               0 3  4        14 0
               0 3  7        10 0
               0 3  4         4 0
               0 3  6         5 0
               0 4  2        14 1
               0 3  4        10 1
               . .  .         . .
               . .  .         . .
               0 3  2         3 1
               0 4 .e         4 1
               1 4  3         7 1
               . .  .         . .
               0 4  7         1 0
               0 3 .e 12.692307 0
               0 3 .e        11 0
               . .  .         . .
               0 3 .f        10 0
               1 4  5         6 0
               1 4 .e         8 0
               . .  .         . .
               0 2  6        14 1
               0 2 .e        21 0
               . .  .         . .
               . .  .         . .
               0 4  3         5 1
               0 3  5        14 1
               1 3  6         8 1
               . .  .         . .
               1 3 .f         6 0
               1 3 .e        15 0
               . .  .         . .
               . .  .         . .
               1 4  5         6 1
               0 4  5         2 1
               0 3  6        23 1
               0 4 .e         8 1
               0 3 .f        10 0
               1 4  5         9 0
              .a 3  4        11 0
               1 2 .e         7 0
               0 3  7        10 0
               0 3  6         8 0
               0 2  5         4 0
               . .  .         . .
               0 3 10        10 1
               0 1 .e 23.076923 1
               . .  .         . .
               . .  .         . .
               0 4  2         2 1
               1 4 .e         6 1
               . .  .         . .
               . .  .         . .
               0 3  2        10 0
               0 4  4         9 0
               . .  .         . .
               . .  .         . .
               0 4  3         3 0
               0 4  2         3 0
               . .  .         . .
               . .  .         . .
              end

              Comment


              • #8
                I don't see what's wrong. the values that are missing after the reshape were also missing before the reshape, no?

                Comment


                • #9
                  Hi Øyvind, I found the mistake I made. Thanks for your help

                  Comment


                  • #10
                    that's good!

                    Comment

                    Working...
                    X