New Data: ‘Annual Canadian Lynx trappings 1821-1934’

Lynx abundances through time

Getting acquainted with the dataset

I used simple summary statistics and plotting to look at trends in the data, including:

data(lynx)
plot(lynx)
summary(lynx)
class(lynx)

Is there a linear trend in trapped lynx through time?

I fit the data to a linear model to determine the extent to which the number of trapped lynx varied from year to year.

lynxtime <- time(lynx)
lynx.lm <- lm(lynx ~ lynxtime)
summary(lynx.lm)

I interpreted the lm output to mean that the number of trapped lynx increased annually by 3 animals over the length of the data set.

I then used a moving average filtering method in order to smooth the data.

ma10 <- filter(x=lynx, filter=rep(x=1/10,times=10), sides=2)
ma5 <- filter(x=lynx, filter=rep(x=1/5,times=5), sides=2)
plot(lynx,col="grey")
lines(ma10,col="red",lwd=2)
lines(ma5,col="blue",lwd=2)
abline(lynx.lm, col="black",lwd=2, lty="dashed") 

Note the trend line has a very slight increase over the time period.

I took some advise and played around with the filter lengths a little.

ma8 <- filter(x=lynx, filter=rep(x=1/8,times=8), sides=2)
ma5 <- filter(x=lynx, filter=rep(x=1/5,times=5), sides=2)
plot(lynx,col="grey")
lines(ma8,col="red",lwd=2)
lines(ma5,col="blue",lwd=2)
abline(lynx.lm, col="black",lwd=2, lty="dashed") 
ma6 <- filter(x=lynx, filter=rep(x=1/6,times=6), sides=2)
ma5 <- filter(x=lynx, filter=rep(x=1/5,times=5), sides=2)
plot(lynx,col="grey")
lines(ma6,col="red",lwd=2)
lines(ma5,col="blue",lwd=2)
abline(lynx.lm, col="black",lwd=2, lty="dashed") 

It seems that a filter rep of 1/8 is better than that of 10 or 6, and is a more of a median value.

What are the forecasts for lynx trappings given the data?

lynxforecasts <- HoltWinters(lynx, beta=FALSE, gamma=FALSE)
lynxforecasts
lynxforecasts$fitted
plot(lynxforecasts)

I’m not really sure what these forecasts are revealing, but there seems to be a consistent skew to the right for the forecasted data.