knox.Rd
This function implement space-time analysis with the knox test
knox(x, crs, dt, ds, sym, sp_link, planar_coord)
is the dataset with the coordinates and onset of symptoms
is the coordinate reference system.
is the temporal windows.
is the spatial windows.
is the MonteCarlo replications number.
is the logical value. If sp_link is true the space-time link is built with sp, else with sf.
is the logical value.if planar_coord is false, the dataset is projected to a planar system.
a list with three elements: knox, st_link, space-time link. - *knox* is a list with three elements:
Knox statistic, which is the number of pairs of points found in a given space-time distance.
p-value calculated from MonteCarlo simulation.
Relative Risk - calculated by observed value (Knox statistics) divided by mean of simulated values.
- *st_link* is a origen-destination dataset of class dataframe. This dataset has four variables:
is the longitude of the point of origin.
are the latitud of the point of origin.
are the longitude of the destination point.
are the latitud of the destination point.
- *space-time link* is a sf object (LINESTRING) with crs 4326.
This function implements the space-time analysis with the knox test. x is a dataframe with three variables: x (longitude), y (latitude) and onset (onset of symptoms) The coordinates should be projected to a planar system. The function rknox test use the (knox)[https://github.com/thanhleviet/knox] package of (github)[https://github.com/].
Knox, E. (1964). The detection of space-time interactions. Journal of the Royal Statistical Society. Series C (13(1), 25-30. Tango, T. (2010). Statistical methods for disease clustering. Springer.