Description Usage Arguments Value Examples
Generate a data frame for one city with storm days, lagged days, and matched
control days (non-storm days). The data frame will be directly used for
crossbasis()
function in the dlnm
package.
1 2 3 | Match_data(root = "~/Documents/NMMAPS/", criterion, city,
control_ratio = 10, lag_1 = -2, lag_2 = 7, storm_id = NA,
seed = 1235, collapseAge = TRUE)
|
root |
The local path where the NMMAPS data is located. |
criterion |
A character string which could be "rain50", "wind18", etc. |
city |
A character string giving the abbreviation of city's name. |
control_ratio |
A integer vector giving the number of control days for one storm day. |
lag_1 |
A integer vector giving number of lagged days before a certain storm day. |
lag_2 |
A integer vector giving number of lagged days after a certain storm day. |
storm_id |
A character vector giving the storm ID of one specific storm when you want to investigate the effect of this storm only. |
collapseAge |
Logic value specifying whether to aggregate records based on age group. |
This function returns a dataframe with first l
(l is equal to
the value of lags
argument which is 14 by defauls) rows of NA, and
n
stratums datasets. n
is the number of storms if default
storm_id
is used, otherwise there is only one stratum. Each stratum
has one row of storm day, l rows of lagged days, and 15 (by default) rows of
matched control days.
1 2 3 4 5 | ## Not run:
Match_data(root = "~/Documents/NMMAPS/",
criterion = "rain75", city = "miam", storm_id = "Irene-1999")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.