Announcement

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

  • String values in red

    Guys, could you help me please? I have several names in variable mun ("municipality alpha", "municipality beta" and so on), but they are written in red in my dta. However, in properties, the type of this variable is str28 and format is %28s. How can I solve this problem and make the data in this variable be recognized by Stata?

  • #2
    Such variables are "recognized by Stata" -- as string variables. If you mean that you think they should be numeric, please give us a data example for advice about to convert them to numeric.

    Comment


    • #3
      Why do you think your string variable is not recognized by Stata? In Stata's Getting Started PDF included with your Stata installation and accessible through Stata's Help menu you will read

      Strings and value labels are color coded. To help distinguish between the different types of variables in the Data Editor, string values, value labels (see [GSW] 9 Labeling data), and all other values are displayed in different colors.
      The default is to display strings in red, and value labels in blue. If you run the following experiment
      Code:
      sysuse auto, clear
      browse
      you will see that the values of the string variable make are displayed in red, and the value labels for the numeric variable foreign are displayed in blue as Domestic and Foreign, although clicking on one of them will show that the numeric values are 0 and 1.

      If you haven't read the Getting Started PDF it would be worth your time to do so.

      Comment


      • #4
        Thanks, guys! Sorry for the simple question, I'm a beginner in Stata.

        Comment

        Working...
        X