First generate the mean number of claims:
egen average_claim = mean(num_claims) by(census)
Sort variables so they are in the correct census and month order:
sort census month
graph:
by census: graph average_claim year, c(l)
This will certainly work, but will cause a number of graphs to just display
on the screen. Perhaps adding saving( ) would be useful. However that
brings up a limitation of by (which is a wonderful feature, but sometimes
does not do all that one needs...) It also does not allow labelling of the
graphs. A modified