Announcement

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

  • Create Panel workfile with data from excel

    I need to do a panel regression where the observations varies across company, country and year. I therefore believe that each observation can be identified by "year" and "Company". I want to stack the data so that each company is listed one time each year and so that each variable is only listed once. Currently, I have each company listed once and all variables listed each year. Could you please help me to create the panel data workfile with excel?
    and how can I include the variable " country" ?
    Could you give me an example ??
    Thanks !


  • #2
    It's not clear (to me) what you need. This is a Stata forum, so I don't see how cretaing a databse "with" MS Excel is relevant here. Did you mean your initial database is in MS Excel and you want to take it to Stata, where you will manipulate it?

    If so, start with help import and help reshape.

    An example of your initial and desired data would clear things up.
    You should:

    1. Read the FAQ carefully.

    2. "Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!"

    3. Describe your dataset. Use list to list data when you are doing so. Use input to type in your own dataset fragment that others can experiment with.

    4. Use the advanced editing options to appropriately format quotes, data, code and Stata output. The advanced options can be toggled on/off using the A button in the top right corner of the text editor.

    Comment


    • #3
      Yes it is my initial databe. If Ido like this, it seem to have 3 identifiers - Company, Country, and then Year. But company doesn't appear to be a panel identifier.

      Comment


      • #4
        Could you please help me to create the panel data workfile with excel?
        and how can I include the variable " country" in the panel data spreadsheet ?
        Could you give me an example ??

        Comment


        • #5
          As Roberto indicated, your question seems the wrong way round. If you want advice on using MS Excel, there are likely to be better places to ask than here.

          Otherwise import some of your data into Stata; show us what they are like; tell us what you want instead.

          http://www.statalist.org/forums/help Section 12 has concrete advice.

          Comment

          Working...
          X