an example of time series regression analysis

本文探讨了Shumway等人1988年关于洛杉矶县心血管死亡率、温度和污染可能影响的研究。通过对数据的季节性分析和散点图矩阵展示,发现死亡率与温度和颗粒物存在可能的线性关系。建立了一个包含趋势、温度、温度平方和颗粒物水平的回归模型,并计算了AIC、AICc和BIC,以评估模型的适用性。
摘要由CSDN通过智能技术生成

This passage will introduce an example of time series regression analysis.

the series

The data shown below are extracted series from a study by Shumway et al.(1988) of the possible effects of temperature and pollution on weekly mortality in Los Angeles County.

library("astsa")
par(mfrow=c(3,1))
tsplot(cmort, main="Cardiovascular Mortality", ylab="")
tsplot(tempr, main="Temperature", ylab="")
tsplot(part, main="Particulates", ylab="")

在这里插入图片描述

There are strong seasonal components in all of the series, corresponding to winter-summer variations and the downward trend of the cardiovascular morality over the 10-year period.

scatterplot matrix

I will display a scatterplot matrix by R to explore the relation between morality and the pollutant particulates and a possible relation to temperature.

ts.plot(cmort,tempr,part,col=1:3)
legend("topright",legend=c("Mortality","Temperature","Pollution"),lty=1,col=1:3)
pairs(cbind(Mortality=cmort, Temperature=tempr, Particulates=part))

在这里插入图片描述
A scatterplot matrix shown below indicates a possible linear relation.
在这里插入图片描述
The lineplot shown above indicates that higher temperatures as well as lower temperatures are associated with increases in cardiovascular mortality.

model

Based on the scatterplot matrix, we entertain a model where M t M_t Mt denotes mortality, T t T_t Tt denotes temperature, P t P_t Pt denotes the particulate levels, T . T. T. denotes the mean of temperatures to avoid collinearity problems.

M t = β 0 + β 1 t + β 2 ( T t − T . ) + β 3 ( T t − T . ) 2 + β 4 P t + w t M_t = \beta_0 + \beta_1t + \beta_2(T_t-T.) + \beta_3(T_t-T.)^2+\beta_4P_t+w_t Mt=β0+β1t+β2(TtT.)+β3(TtT.)2+β4Pt+wt

Next, I will fit the regression model using the code below.

temp = tempr-mean(tempr)
temp2 = temp^2
trend = time(cmort)
fit = lm(cmort~ trend + temp + temp2 + part, na.action=NULL)
summary(aov(lm(cmort~ cbind(trend, temp, temp2, part))))

Output:
在这里插入图片描述
These results will be summarized in an ANOVA table as given below.
在这里插入图片描述

AIC、AICc、BIC

num = length(cmort)
AIC(fit)/num - log(2*pi)
BIC(fit)/num - log(2*pi)
AICc = log(sum(resid(fit)^2)/num + (num+5)/(num-5-2))
AICc

Output:

[1] 4.721732
[1] 4.771699
[1] 3.723158

Now, we have computed the corresponding values of AIC, AICc and BIC.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值