Announcement

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

  • years on x axis for the graph

    Hello Forum Members,
    I am trying to generate a graph for Y (output) on X (10 Years) for 15 categories. Instead of the year displaying as it is, just serial number is displaying, I tried looking through web like https://stats.oarc.ucla.edu/stata/fa...ta-with-dates/ . I followed the same and used the following tsset command to tell Stata that the variable X represents Year and that its period is Yearly.

    tsset year1, yearly


    Immediately the error, r(451), appeared and saying that repeated time values in sample. It would be grateful if anyone could resolve this issue.

    Note: I feel the graph is not required here to understand the problem, however I don't mind to share if it is required.

  • #2
    karthick veerapandian this is very little information to be able to diagnose the problem. Please include an extract of your data using the dataex command, as well as the code you are using to produce the graph.

    Comment


    • #3
      Although I agree with Hemanshu Kumar that #1 contains too little information, the immediate problem is clear.

      You need to tsset using your category variable and your time variable. If your category variable is string, you need to encode to a numeric version. See

      Code:
      help tsset 
      for more detail. I can't say what your graphics problem is. You don't show any of (1) example data (2) the code you used (3) the graph you got.

      Comment

      Working...
      X