Announcement

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

  • merge 2 columns

    Hi!
    we have variable A2021 and A2022
    we want one variable A , but create individual 2021 and individual2022, like this

    A2021 A2022
    1
    2

    A
    11
    12
    21
    22

    Can you help us?
    Thanks!

  • #2
    I don't understand the question. What would the result look like?

    Also what is the arrangement of this data in your Stata data set(s)? Please use the -dataex- command to show example data. If you are running version 17, 16 or a fully updated version 15.1 or 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


    • #3
      Uhhhhhhhhhhhhhhhhhh this sounds like a reshape problem, but I don't know without seeing your dataset.

      Comment

      Working...
      X