I've got a time series data set that looks at population numbers on a yearly basis, and I would like to know if there is a significant difference between certain years, and if so- which years are statistically similar to each other. I'm using R, so I'm hoping to get some advice on R code to do this.
Here is simplified example time series looking at a population by year:
Year<-c(2001,2002,2003,2004,2005,2006) Pop<-c(1,4,7,9,20,21) DF<-data.frame(Year,Pop)
So given the above data, ideally I would hope for some method that would calculate if there is a significant trend over time (p value) and which years are statistically different from each other (I'm guessing 2001-04 would be in one grouping and 2005-06 would be in a second).