Announcement

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

  • Stata Do file error

    I downloaded a Data set from Social Explorer and I keep receiving this message:

    '' cannot be read as a number for B12007002s[3220]
    (3220 observations read)

    I am not sure how to fix it?

    Please help

  • #2
    Welcome to Statalist.

    Since you don't tell us what command caused this error message, I'm guessing that you are using infile to read your text dataset. The error message tells us that on observation 3220, the data that is to be read into the variable B12007002s cannot be read as a number, and was replaced by a missing value. This was apparently the final observation in the dataset - perhaps the last line of the downloaded file is not actually data and should be deleted before processing it?

    With that said, please 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.

    Section 12.1 is particularly pertinent

    12.1 What to say about your commands and your problem

    Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!
    It's difficult to address a problem when we are not told the command that generated the problem. I tried to guess, but perhaps my guess was wrong.

    The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

    Comment


    • #3
      This was a result of dragging the .do file into the results section. The.do file was read, however, I got this note for every observations 0-3220.

      After that note it reads: (​​​​​​(3220 observations read)

      .
      .
      .
      end of do-file

      I am able to read the names of every variable. However, the names are missing.

      Comment


      • #4
        * read the label of every variable.

        Comment

        Working...
        X