Description Usage Arguments Value Examples
View source: R/data_functions.R
Generate a spatial pixels data frame classifying hotspots and probabilities
1 2 3 4 5 6 7 8 9 10 11 | plot_hotspot_data(
lg,
covariates,
threshold.var = NULL,
threshold.value = NULL,
labels,
threshold.prob = 0.8,
relative = TRUE,
per.days = 10000,
msq = 10000
)
|
lg |
Output from a call to |
covariates |
A |
threshold.var |
A vector of one or two strings specifying the variables to define the hotspots, see Details for how to specify. |
threshold.value |
A vector or one or two values indicating the threshold(s) for determining a hotspot. Given in the same order as threshold.var. |
labels |
A vector of two or four labels for the hotspots, see Details. |
threshold.prob |
A vector of one or two values specifying the exceedence probabilities. |
relative |
A logical value. If one or both of the variable is with respect to a previous time period, whether the comparison should be relative (TRUE) or absolute (FALSE) |
per.days |
If one or both of the variables is incidence, the denominator number of person-days. |
msq |
The denominator for the population density in m^2. Default is hectares (per 10,000m^2) |
A spatialPixelsDataFrame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(dat,square,square_pop)
lg1 <- lgcp(data=dat,
pop.var = c("popdens"),
boundary=square,
covariates=square_pop,
cellwidth=0.1,
laglength = 7,
mala.pars=c(200,100,1),
nchains=2)
plot_hotspot_data(lg1,
covariates = square_pop,
threshold.var = c("poppp+obs+latent"),
threshold.value = 1,
threshold.prob=0.8,
labels=c('low','high incidence'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.