Announcement

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

  • #16
    Yash, the basics are that if you do not read the one paragraph help file of the command you are using, you are not likely to make it work. Out of the dozens of thousands people around here, you are the first one to report that you cannot make -dataex- work...

    Otherwise back to your issue, and again, this issue can not be seen as long as I do not see exactly your data... but anyways from what you say, it seems that your STATEPOST variable is actually numerical, like 1, 2, 3, etc., but these "CA", "TX" that we see when you post a picture of your data are Labels.

    You can move from categorical and nicely labelled variable to a string variable using the command -decode-. Then you do what we did above.

    Comment


    • #17
      "CA " and "CA" are both strings.

      @Joro Kolev's solution is along the right lines if your state abbreviations are in string variables. But your screenshot shows that they are in numeric variables with value labels. That is shown by the blue colouring.

      Let's try again with getting you to understand how Statalist works best. All posters are reminded every time they post to read the FAQ Advice before posting. Being new to Stata is precisely why you need to read it even more than most other people. It's fine that you're new to Stata, but you're wasting your time, as well as other people's, through not focusing on what we ask. There aren't short-cuts avoiding that. We aren't customer services; the people in this thread are all volunteers and the contract implied is that you have to help us to help you.

      https://www.statalist.org/forums/help#stata is the most important section of the FAQ Advice for you at present.

      I am familiar with dataex as its second author. There is no error message that says that the data is too large to work. There are error messages that specify particular problems with what you asked. I guess that you just tried dataex and got some error message that gave you also the advice

      Code:
      Try specifying fewer variables
      which means what it says. You ignored that advice. I have to guess, because you didn't follow FAQ Advice #12 and tell us exactly what you typed and exactly what happened.

      Also, screenshots are not nearly as helpful as you hope. This is explained at the same place. Still, I got a hint from what you showed.

      Here is an example of technique you can try in a new Stata.

      Code:
      . sysuse auto, clear
      (1978 Automobile Data)
      
      . describe foreign
      
                    storage   display    value
      variable name   type    format     label      variable label
      --------------------------------------------------------------------------------------
      foreign         byte    %8.0g      origin     Car type
      
      . label list origin
      origin:
                 0 Domestic
                 1 Foreign
      In the auto dataset, foreign is a variable with value labels. Its value labels are called origin. If you label list origin, you see what the value labels are.
      .
      So, what you should do is type

      Code:
      describe statepost 
      and then use label list with the value label shown. It may also be statepost, for all we can tell.

      Running


      Code:
      dataex statepost 
      would give us some, but necessarily all, of what we need to know.

      EDIT: Overlaps a bit with other very recent posts.
      Last edited by Nick Cox; 18 Jan 2019, 03:23.

      Comment


      • #18
        I'm sympathetic to you as a new user of Stata - it's a lot to absorb. And even worse if perhaps you are under pressure to produce some output quickly. Nevertheless, I'd like to encourage you to take a step back from your immediate tasks.

        When I began using Stata in a serious way, I started, as have others here, by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. There are a lot of examples to copy and paste into Stata's do-file editor to run yourself, and better yet, to experiment with changing the options to see how the results change.

        All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu. The objective in doing the reading was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and PDF manuals.

        Stata supplies exceptionally good documentation that amply repays the time spent studying it - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry and to work effectively.

        On the path you are on now, you risk exhausting the patience of other Statalist members. As you have been advised, you should also review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question. And section 3 is appropriate as well.

        3. What should I do before I post?

        Before posting, consider other ways of finding information:
        • the online help for Stata
        • Stata's search command, which can tell you about all built-in Stata commands, all ado-files published in the Stata Journal, all FAQs on the Stata website, www.stata.com, and user-written Stata programs available on the Internet (if you have Stata 12 or earlier, you can use findit to search all these sources at once)
        • the manuals, accessible in .pdf form to all
        ...

        Comment

        Working...
        X