Description Usage Arguments Details Value Author(s) References See Also Examples
Function threshpt
estimates a optimal threshold point of non-linear relationship using a piecewise linear regression analysis. A user needs to give approximate threshold point range to start, then threshpt
finds optimal threshold point within the given approximate range using grid search method (see details).
1 2 |
formula |
An object of class |
family |
Family of distribution which is same as the |
data |
Data to be used |
expvar |
Main exposure variable (X) |
startrng |
Approximate starting point |
endrng |
Approximate ending point |
searchunit |
Unit to search for a threshold point |
... |
Not used |
threshpt()
estimates a optimal threshold point based on grid search method which finds the point that produces minimum deviance among the equally spaced grid points. This method widely used in environmetal epidemiologic studies.
threshpt
returns a optimal threshold and estimates/etandard errors/p-values for the coefficients of a fitted model with optimal threshold.
Youn-Hee Lim, Il-Sang Ohn, and Ho Kim
Lerman P. Fitting segmented regression models by grid search. Applied Statistics, 23(1):77-84, 1980.
Kim H, Ha JS, and Park J. High temperature, heat index, and mortality in 6 major cities in south korea. Archives of environmental & occupational health, 61(6):265-270, 2006.
Kim SY, Lee JT, Hong YC, Ahn KJ, and Kim H. Determining the threshold effect of ozone on daily mortality: an analysis of ozone and mortality in seoul, korea, 1995-1999. Environmental research, 94(2):113-119, 2004.
Stafoggia M et al. Short-term associations between fine and coarse particulate matter and hospitalizations in Southern Europe: results from the MED-PARTICLES project. Environmental health perspective, 121(8):932-938, 2013.
modTempEff
1 2 3 4 5 6 7 8 9 10 | # 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)
mythresh
|
Loading required package: splines
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)
Coefficietns for main exposure:
beta1 se1 p1 beta1+2 se1+2
-5.100188e-04 9.126435e-04 5.762731e-01 1.841560e-02 3.229438e-03
p1+2
1.181208e-08
Other coefficients:
Estimate Std. Error Pr(>|z|)
(Intercept) 4.745430e+00 2.619664e-02 0.000000e+00
meanpm10_m2 3.258080e-04 8.698421e-05 1.799637e-04
meanhumi -8.188705e-05 1.579924e-04 6.042507e-01
factor(dow)2 3.620847e-02 7.165486e-03 4.345205e-07
factor(dow)3 1.661660e-02 7.199066e-03 2.099022e-02
factor(dow)4 1.279535e-02 7.209467e-03 7.593109e-02
factor(dow)5 1.679618e-02 7.201088e-03 1.967705e-02
factor(dow)6 2.102104e-03 7.225583e-03 7.711085e-01
factor(dow)7 1.790020e-03 7.221325e-03 8.042275e-01
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.