Announcement

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

  • Time Series Graphics (tsset isn't working because I have repeated Time Data)

    Hey everyone,

    I have a question regarding the creation of graphics for time series.
    I have two rows with one being the study subject ( ‘1’ denoting singles and ‘2’ denoting married couples).
    Additionally I have a row called ‘year’ ranging from 2002 to 2012 with repeated values obviously.

    Now I would like to create a graph with two lines (one for the singles and one for the married couples) showing how their percentage is changing from year to year (more specifically from 2002-2003-2004-2005-…-2012). The X-axis should be the Year and the Y-axis should show the distribution of both single and married people.

    How do I do that? I am completely lost. I tried to set ‘year’ as time data using the tsset command, but it shows me an error 451 “repeated time values in sample”.

    Could anybody help me, please? Thank you J

    Sophie



  • #2
    Since the more knowledgeable plotters among us have yet to leap in, let me contribute the following.

    Despite the inclusion of year among your variables, you do not have time series data that benefits from tsset. I think some sort of graph twoway is called for, perhaps following some sort of summarization or collapsing of the data to reduce it to two observations (single, married) per year.

    Comment

    Working...
    X