Announcement

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

  • Reshape Wide_long Error

    Hi,
    I am trying to reshape from wide to long using the following command:

    reshape long percwg_ percwgnat_ percwgnnat_ percwgma_ percwgfe_ percwgage1_ percwgage2_ percwgage3_ percwgage4_ percwgage5_ percwgage6_ cntr_8090_ cntr_0005_ cntr_8007_ cntr_9007_ cntr_0007_ cntr_0705_ cntr_9000_ cntr_8005_ cntr_8000_ cntr_9005_ , i(year) j(pctile)

    I keep getting the following error : too many values r(134);

    I have a total of 2352 variables and 1551 observation before the command reshape.

    What can I do in order to fix this error ? How do I figure out what it is causing the error?

    Thank you

    Giu


  • #2
    With regards to too many variables, please take a look at this FAQ: http://www.stata.com/support/faqs/da...reshape-error/

    With regards to "too many values" error message: http://www.stata.com/manuals14/perror.pdf
    Last edited by Marcos Almeida; 20 Apr 2017, 14:56.
    Best regards,

    Marcos

    Comment


    • #3
      Thank you, but the error I am getting is too many values (and not too many variables).


      Here is the command executed:

      Data wide -> long

      Number of obs. 5 -> 500
      Number of variables 2352 -> 274
      j variable (100 values) -> pctile
      xij variables:
      percwg_1 percwg_2 ... percwg_100 -> percwg_
      percwgnat_1 percwgnat_2 ... percwgnat_100 -> percwgnat_
      percwgnnat_1 percwgnnat_2 ... percwgnnat_100-> percwgnnat_
      percwgma_1 percwgma_2 ... percwgma_100 -> percwgma_
      percwgfe_1 percwgfe_2 ... percwgfe_100 -> percwgfe_
      percwgage1_1 percwgage1_2 ... percwgage1_100-> percwgage1_
      percwgage2_1 percwgage2_2 ... percwgage2_100-> percwgage2_
      percwgage3_1 percwgage3_2 ... percwgage3_100-> percwgage3_
      percwgage4_1 percwgage4_2 ... percwgage4_100-> percwgage4_
      percwgage5_1 percwgage5_2 ... percwgage5_100-> percwgage5_
      percwgage6_1 percwgage6_2 ... percwgage6_100-> percwgage6_
      cntr_8090_1 cntr_8090_2 ... cntr_8090_100 -> cntr_8090_
      cntr_0005_1 cntr_0005_2 ... cntr_0005_100 -> cntr_0005_
      cntr_8007_1 cntr_8007_2 ... cntr_8007_100 -> cntr_8007_
      cntr_9007_1 cntr_9007_2 ... cntr_9007_100 -> cntr_9007_
      cntr_0007_1 cntr_0007_2 ... cntr_0007_100 -> cntr_0007_
      cntr_0705_1 cntr_0705_2 ... cntr_0705_100 -> cntr_0705_
      cntr_9000_1 cntr_9000_2 ... cntr_9000_100 -> cntr_9000_
      cntr_8005_1 cntr_8005_2 ... cntr_8005_100 -> cntr_8005_
      cntr_8000_1 cntr_8000_2 ... cntr_8000_100 -> cntr_8000_
      cntr_9005_1 cntr_9005_2 ... cntr_9005_100 -> cntr_9005_

      (100 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (300 missing values generated)
      (200 missing values generated)
      (300 missing values generated)
      too many values
      r(134);

      end of do-file
      r(134);


      Anyone else has an idea on how to fix it? What variable is causing this?

      Comment

      Working...
      X