Last data update: 2014.03.03

R: Health Effects of Air pollution and Temperature (HEAT)
HEAT-packageR Documentation

Health Effects of Air pollution and Temperature (HEAT)

Description

Package HEAT provides Korea data of mortality and environment variables for time-series analysis. The package includes several functions to read specific city information, generate single and moving average lag days, and estimate a threshold point in a nonlinear relationship.

Details

Package: HEAT
Type: Package
Version: 1.2
Date: 2013-10-03
License: GPL-2
LazyLoad: yes

The package can be used to analyze Korea mortality and environment data, providing following functions: function read6city to load a single city's data, function lagdata to generate exposure variables at single and moving average lag days, function threshpt to estimate threshold point of a nonlinear relationship (e.g., U-, V-, or J-shape), function summary.threshpt to give summary informations for a fitted threshpt object, function plot.threshpt to produce some informative plots, and function rrcalc to calculate relative risks and their 95% confidence intervals below and above a threshold.

The package was supported by the Basic Science Research Program (#2010-0009581), International Research & Development Program (#2012K1A3A1A12054839), Women Scientist Research Program (#2012R1A1A3005549) and Global Research Lab (#K21004000001-10A0500-00710) through the National Research Foundation of Korea (NRF) funded by the Korea Ministry of Science, ICT (Information and Communication Technologies) and Future Planning.

Author(s)

Youn-Hee Lim, Il-Sang Ohn, and Ho Kim

Maintainer: Il-Sang Ohn <byeolbaragi@gmail.com>

See Also

read6city, lagdata, threshpt

Examples

# read the Seoul data set and create lag variables
data(mort)
seoul = read6city(mort, 11)
seoul_lag = lagdata(seoul, c("meantemp", "mintemp", "meanpm10", "meanhumi"), 5)

# find a optimal threshold and conduct piecewise linear regression
mythresh = threshpt(nonacc ~ meantemp_m3 + meanpm10_m2 +  meanhumi + ns(sn, 4*10) + factor(dow), 
			     expvar = "meantemp_m3", family = "poisson", data = seoul_lag,
			     startrng = 23, endrng = 33, searchunit = 0.2)

# provide summary informations
summary(mythresh)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(HEAT)
Loading required package: splines
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/HEAT/heat-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HEAT-package
> ### Title: Health Effects of Air pollution and Temperature (HEAT)
> ### Aliases: HEAT-package HEAT
> ### Keywords: package
> 
> ### ** Examples
> 
> # read the Seoul data set and create lag variables
> data(mort)
> seoul = read6city(mort, 11)
> seoul_lag = lagdata(seoul, c("meantemp", "mintemp", "meanpm10", "meanhumi"), 5)
> 
> # find a optimal threshold and conduct piecewise linear regression
> mythresh = threshpt(nonacc ~ meantemp_m3 + meanpm10_m2 +  meanhumi + ns(sn, 4*10) + factor(dow), 
+ 			     expvar = "meantemp_m3", family = "poisson", data = seoul_lag,
+ 			     startrng = 23, endrng = 33, searchunit = 0.2)
> 
> # provide summary informations
> summary(mythresh)
Call:
threshpt(formula = nonacc ~ meantemp_m3 + meanpm10_m2 + meanhumi + 
    ns(sn, 4 * 10) + factor(dow), family = "poisson", data = seoul_lag, 
    expvar = "meantemp_m3", startrng = 23, endrng = 33, searchunit = 0.2)

Formula:
nonacc ~ meantemp_m3 + meanpm10_m2 + meanhumi + ns(sn, 4 * 10) + 
    factor(dow) + meantemp_m3_2
<environment: 0x2ea1188>

Coefficients:
                Estimate Std. Error  Pr(>|z|)    
(Intercept)   4.7454e+00     0.0262 < 2.2e-16 ***
<Threshold   -5.1002e-04     0.0009   0.57627    
>=Threshold   1.8416e-02     0.0032 1.181e-08 ***
meanpm10_m2   3.2581e-04     0.0001   0.00018 ***
meanhumi     -8.1887e-05     0.0002   0.60425    
factor(dow)2  3.6208e-02     0.0072 4.345e-07 ***
factor(dow)3  1.6617e-02     0.0072   0.02099 *  
factor(dow)4  1.2795e-02     0.0072   0.07593 .  
factor(dow)5  1.6796e-02     0.0072   0.01968 *  
factor(dow)6  2.1021e-03     0.0072   0.77111    
factor(dow)7  1.7900e-03     0.0072   0.80423    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Optimum threshold: 24.2
Deviance of the model with optimum threshold: 3147.556
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>