Description Usage Arguments Details Value Examples
View source: R/train_event_models.R
This function trains models that estimate the average daily number of events.
1 2 3 4 5 6 | train_event_models(
health_events_history = NULL,
weather_history = NULL,
...,
use_ita = FALSE
)
|
health_events_history |
A data frame with historical health events data. At least one week for each month for at least one year (full years are obviusly preferrend) are needed in order to take into account seasonal trends. Colum names must be included in: - mort_all = daily number of death (any causes); - mort_cardiac = daily number of death (cardiac causes only); - mort_resp = daily number of death (respiratory casues only); - mort_cer = daily number of death (cerebrovascular causes only); - hosp_cardiac = daily number of hospitalization (cardiac causes only); - hosp_resp = daily number of hospitalization (respiratory casues only); - hosp_cer = daily number of hospitalization (cerebrovascular causes only); |
weather_history |
[data frame] A data frame with weather historical
data with number of rows equal to the lenght of
If provided, by a column named |
... |
Other possible options passed to the function |
use_ita |
[lgl] (default = FALSE) use italian historical data on weather if the user cannot provide more specific data. |
The output is a list of three lists, named summer
,
non_summer
and full_year
. The first two are used if
ozone data are provided. They refer to a specific set of models that
consider also the ozone in summer period and only other pollutants in the
rest of the year. The last set (i.e., list) refers to a model that is
used if any knowledge about ozone concentrations is provided.
a list of three sets of gam models, one set with the summer model
for each type of event provided in health_events_history
(taking into account also information from O3), one set for the
non-summer models (using only non-O3 pollutant information) and
a set of full-year models which do not use information on O3
(if not provided). Together all the model of the first two sets
or the models of the third set are alternative NULL
.
Output is returned invisible()
. See Details section for
more informations.
1 2 3 4 5 6 | ## Not run:
library(imthcm)
test_models <- train_event_models(test_health, test_weather)
default_models <- train_event_models(use_ita = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.