Announcement

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

  • How to create vectors in Stata using dataset

    Hi everyone. I'm a beginner of Stata and I really hope there is someone who can help me with my research assistant questions! Many thanks in advance!

    I have a dataset, which includes information of many firms. Every firm has 20 quarters (20 rows) of information (N=1 represents quarter 1, N=20 represents quarter 20). Now I want to include every firm's quarter 1 (N=1) cash flow data into one vector X1, every firm's quarter 2 (N=2) cash flow data into one vector X2,....till X20. How can I do this?

    Thanks!

  • #2
    Yihui:
    welcome to this forum.
    Have you already taken a look at -help import-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Yihui:
      welcome to this forum.
      Have you already taken a look at -help import-?
      Carol,

      Thank you.
      No I haven't, so do I need to use import command?

      Comment


      • #4
        Yihui:
        if you already have a dataset in one of the format listed under -import- why not?
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Yihui:
          if you already have a dataset in one of the format listed under -import- why not?
          Carol,

          Yes I know how to import the dataset into stata, but I want to know how to transfer the data to vectors?

          Comment


          • #6
            Yihui:
            if you want go matrices, see -mata-.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X