Announcement

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

  • Reshape wide to long variable not found

    I have been trying to reshape my data from wide to long

    This is an example of how it looks like:

    IdentifierRIC Cash0 Cash1 Cash2 Assets0 Assets1 Assets2 id
    AGRO.BA 999 8888 999 000 999 1336661 1
    ALUA.BA 7007 77042 5827 7376 6368 5510 2
    AUSO.BA 3498616.1 7850334.5 3237908.4 5679970.5 3
    BIOX.BA 2119 1256700 58430 2249700 18160 4
    BOLT.BA 81237.113 98389.677 55871.863 70212.498 75644 5


    I am using:
    reshape long id Cash Assets, i(Cash Assets) j(year)


    but I keep on getting:
    Cash variable not found.

    Please help. Thank you.


  • #2
    Your data example is mangled (count the number of items for each observation). Otherwise this works


    Code:
    reshape long Cash Assets, i(id) j(year)
    Cash and Assets can't be identifiers as well as variable names for the core data.

    See http://www.statalist.org/forums/help#stata for how to present data examples and code more readably and reliably.

    Comment


    • #3
      Thank you!!!

      Comment

      Working...
      X