fitCitySeason {tsModel} | R Documentation |
Fit a seasonally varying coefficient model to NMMAPS data
fitCitySeason(data, pollutant = "l1pm10tmean", cause = "death", season = c("none", "periodic", "factor2"), tempModel = c("default", "rm7", "tempInt", "SeasonInt"), dfyr.Time = 7, pdfyr.time = 0.15, df.Temp = 6, df.Dew = 3, df.Season = 1, obsThreshold = 50, extractors = NULL)
data |
data frame for an NMMAPS city |
pollutant |
name of pollutant variable |
cause |
name of cause of death; choices are "death" (all non-accidental), "cvd" (cardiovascular), or "resp" (respiratory) |
season |
type of seasonal model to fit |
tempModel |
type of temperature model to use |
dfyr.Time |
number of degrees of freedom per calendar year of data to use in the smooth function of time |
pdfyr.time |
fraction of the degrees of freedom used in the overall smooth function of time to use in the smooth function of time specific to the older age category |
df.Temp |
degrees of freedom to use in the smooth function of temperature |
df.Dew |
degrees of freedom to use in the smooth function of dew point temperature |
df.Season |
number of sine/cosine pairs to include in the "periodic" model |
obsThreshold |
minimum number of observations required before a model can be fit to the data |
extractors |
a list of functions which extract elements of the
"glm" object. |
This function fits a seasonally varying coefficient model to data from the NMMAPS study using two different seasonal models. The first is a step function model ("factor2") which uses indicators for the seasons. The second is a hamonic model ("periodic") which uses sines and cosines.
An object of class "glm"
is returned.
Peng RD, Dominici F, Pastor-Barriuso R, Zeger SL, Samet JM (2005). “Seasonal Analyses of Air Pollution and Mortality in 100 US Cities,” American Journal of Epidemiology, 161 (6), 585–595.