matchdist | R Documentation |
This function matches exposed units and unexposed units by a pre-specified buffer distance (Euclidean distance)
matchdist( data, bexp, long, lat, exp.status = 1, distbuf = 0.1, exp.included = TRUE, replace = TRUE )
data |
a dataset object. |
bexp |
a character string indicating the name of the binary exposure. Use apostrophe like "VariableName" |
long |
a character string indicating the name of the longitude variable of observation units |
lat |
a character string indicating the name of the latitude variable of observation units |
exp.status |
a numeric vector indicating the value indicating exposed units. Defalut=1 |
distbuf |
a numeric vector indicating the buffer distance by which exposed units and unexposed units are matched |
exp.included |
an indicator of whether exposed units are matched with not only unexposed units but also other exposed units. Defalut is TRUE. If FALSE, exposed units are matched with only unexposed units. See details |
replace |
an indicator of whether matching is done with replacement. Default is TRUE. If FALSE, matching is done without replacement. If FALSE, note that the output of this function may differ by the order of observation units in the original dataset. |
matchdist()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.