Announcement

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

  • #16
    Carlo Lazzaro I tried, but the resulting dataset is all mixed up, there seems to be some kind of mistake - maybe because I am trying the code with three string vars instead of one.

    Comment


    • #17
      Carlo Lazzaro I tried, but the resulting dataset is all mixed up, there seems to be some kind of mistake - maybe because I am trying the code with three string vars instead of one.

      Comment


      • #18
        The reason you can't manage is that you don't really have the same problem. You just have a relatively simple (*) problem in reshape long.

        This seems to work with your data example. There will be a better name than whatever.

        Code:
        ds, has(type numeric)
        rename (`r(varlist)') (whatever=)
        
        reshape long whatever, i(Route Border Nationality) j(Date) string 
        
        gen Mdate = monthly(Date, "MY")
        
        format Mdate %tm

        (*) In interviews of very rich people at some point the person often says "The first million (billion, trillion) dollars were the hardest". Sure.... In Stata the first 10 (100, 1000) reshapes are the hardest.

        Comment


        • #19
          Thank you very much! I guess I have to practice....

          Comment


          • #20
            Only way to learn is to try it.

            Comment

            Working...
            X