Announcement

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

  • Importing a set of observations

    Dear friends,

    I would really appreciate if you could suggest a way to do the following in stata.

    Suppose we have a questionnaire about whether you prefer Dark or Light colours. 20 people responded
    D represents dark and L represents light

    L L D L D
    D D L L D
    D L D D L
    D D L D L

    Would I have to manually enter these observations into data or is there a code for it?
    I need to create a pie and a bar chart. What would be the code for changing all relevant variables and titles on those graphs?

    I have just been introduced to stata I am really having trouble making sense of it. I would be very very grateful if you could guide me through it.

    Many thanks


    Brian

  • #2
    Hey Brian, welcome to the Stata universe!
    1. What format is your data in? The code would look something like what is below, adjusting for the name of the file you're inputting and the type. For more info (including acceptable file types) type help import into the command box
      Code:
      import delimited dataset.csv, clear
    2. The manual for creating and editing a bar chart can be found here: https://www.stata.com/manuals13/g-2graphbar.pdf
    3. The manual for creating and editing a pie chart can be found here: https://www.stata.com/manuals13/g-2graphpie.pdf
    In general google and using the help ____ code will get you through many basic things

    Comment


    • #3
      Hi Britany,

      Thank you for your prompt and welcoming response.
      The trick is that the data "set" I was supposed to analyse with the the help of the charts was given to me in a .pdf file as a table:
      L L D L D
      D D L L D
      D L D D L
      D D L D L
      I was not given any instructions as to how to enter these observations into stata, but I felt that manually typing them in is not the way to go.

      I tried to copy the table into excel and then import into Stata's data editor, but that did not work. I am cognisant of how ridiculously easy this problem might seem to the denizens of this forum but I really am struggling with it so any code suggestions would be very much appreciated

      Comment

      Working...
      X