考虑季节性变化的中断时间序列(ITS)分析-R code for ITS model- taking into account seasonal variations

#### R code for ITS model- taking into account seasonal variations####

####用R语言实现"包含季节性变化的中断时间序列分析"###2024.12.09###

####联系方式:shaofengsui@163.com ;yangcheng@bscdc.org.cn ###

####R3.3.2 及以上版本####

####需要模拟数据"pm1202.csv"的读者,请发邮件索取###

####推荐2篇参考文献,请大家下载学习###

####Bernal, J.L., Cummins, S. and Gasparrini, A. (2020) Corrigendum to interrupted time series regression for the evaluation of public health interventions: a tutorial. Int J Epidemiol 49(4), 1414.

####This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted reuse, distribution, and reproduction in any medium, provided the original work is properly cited.

####任洋洋,等. 应用中断时间序列方法评估干预措施对陆家嘴水厂出厂水三卤甲烷的影响 [J],环境与职业医学, 2024,41(4):420-424.(PDF下载https://www.jeom.org/article/doi/10.11836/JEOM23297 )

####文章中有超链接,可查看R code###

##################################################################

###考虑季节性变化的R code 编码如下###

### 钢铁厂搬迁对空气PM2.5影响的ITS分析-考虑季节性变化 ###

### 安装包###

library(foreign) ;

library(tsModel) ;

library(zoo) ;

library("lmtest") ;

library("Epi") ;

library("splines") ;

library("grid") ;

library("vcd") ;

library(dplyr)

setwd("D:/R")  ###设置工作路径###

data <- read.csv("pm1202.csv")  ###读取资料,模拟数据可发邮件向作者索取#####

head(data)  ##显示数据表的前6行###

View(data)   ##看一下数据表

# 变量的含义

# year   年

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值