I'm sorry for what is probably a very simple question.
I would like to graphically represent the trends in three different operations over time. My preference is for a line graph with year on the x-axis and frequency on the y-axis where each line represents a different operation. This feels as if it ought to be simple (it is in Excel!)
I have tried "twoway (line procedure year)", which just produces a graph with hundreds of overlapping lines.
I then discovered tsline but have been unable to successfully define my variables as a time series: "tsset id year, y" gives the error "repeated time values within panel". I know that some patients might be listed as undergoing the same operation in the same year (most likely they had one side operated and then the other...) and hadn't anticipated this as being an obstacle for drawing the graph.
Is there an easier way to achieve this?
David
I would like to graphically represent the trends in three different operations over time. My preference is for a line graph with year on the x-axis and frequency on the y-axis where each line represents a different operation. This feels as if it ought to be simple (it is in Excel!)
I have tried "twoway (line procedure year)", which just produces a graph with hundreds of overlapping lines.
I then discovered tsline but have been unable to successfully define my variables as a time series: "tsset id year, y" gives the error "repeated time values within panel". I know that some patients might be listed as undergoing the same operation in the same year (most likely they had one side operated and then the other...) and hadn't anticipated this as being an obstacle for drawing the graph.
Is there an easier way to achieve this?
David
Comment