Announcement

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

  • Master thesis - multiple excel sheets and make a dataset to be one variable

    Hi!
    Im doing my master thesis and im not that good at STATA so I really need some help to begin!

    I have six sheets on excel that each represent an variable (e.g wage, productivity, productprice). Most of the variables has information about 18 industries over 39 quarters (timeline 1.quarter 2009-3.quarter 2018).
    So my questions are:
    1) How do I add all those sheets to STATA? (I could just find information about two sheets and when i tried to merge two sheets it didnt work with quarter as key variable maybe because quarter is a string variable?)
    2) How can I collect all the data into one variable. I dont know how to explain it but I have one sheet for productivity with the information about industries and the timeline but I want to make all that data the productivity variable (if its even possible?)

    Im going to analyze how wage is affected by productivity, productprice ++
    My equation is: wc=β_0+β_1 p+β_2 prod+β_3 cpi+β_4 u+β_5 wa


    Hope that wasnt too confusing and that somebody could help me out!

  • #2
    Welcome to the Stata Forum / Statalist.

    Please read the FAQ. There you'll find advice about sharing data/output/command as well as other useful tips.

    That being said, you may start by using the - import excel - command.

    Quite generally, you may start by typing - help import excel - in the command window and taking a look at the examples.

    After that, and depending on the data display, you may use - merge -, or - append - to complete the task.

    Best regards,

    Marcos

    Comment


    • #3
      To the advice from Marcos, let me add that you can "learn by doing" by choosing File > Import > Excel Spreadsheet from the menus and use it to import one of your worksheets into Stata. After that's done, you can see the command Stata ran in the Results window.

      Comment

      Working...
      X