Testing the influence of monthly fluctuations Let's say we have a dataset that looks like this:
month   year   airquality
jan     2000   36             
...     ...    ...
dec     2001   33
jan     2002   44
...     ...    ...
dec     2002   21
jan     2003   44
...     ...    ...
etc.

The airquality in this case is considered to be the number of parts per million of something.
My question is, how would you test if the factor month has an influence on the airquality and how much of an influence? I am having troubles to think of the right method for testing this because besides a monthly difference there may als be an influence of the year factor (ie. airquality may get worse through the years as traffic intensity increases). 
Hope you can point me in the right direction (the test/model to use, for example)
 A: There are different approaches that you can use. I will list some here. For example, you can decide to go with a SARIMA model. This is an extension of the usual ARIMA models that take into account the seasonality effect. Here seasonality effect means the effect of month. Another method is to consider a naive model called "Time series regression". In this case, to test the effect of month, you can define some dummy variables (specifically since you have 12 months or 12 levels, you should define 11 dummy variables) and include the time (year) effect as well. The model in R may look like the following:
M.1=lm(airquality~as.dummy(month)+year)

But most probably, if you fit the model M.1 in above, you will end up with serially auto-correlated residuals, which is not good! So you need to correct it and take into account that correlation. One way to fix it is to use a model called Generalized Least Square. But to fit this, you need to first model the auto-correlation among the residuals properly. Off course you can fit above models and then compare them based on some criteria to select a reasonable model.
