Description Usage Arguments Value See Also Examples
View source: R/plot_functions.R
Plot incidence, model components, and their changes over time.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
An lgcpReal object, output from a call to |
covariates |
A |
osm |
A logical value whether a map from OpenStreetMap should be included in the plots. |
per.days |
Integer, the number of person-days to use for incidence, default is 10,000. |
change.lag |
If not NULL, then plots are created of the change in outputs compared to this number of periods prior. |
relative |
A logical value indicating whether the comparisons (if change.lag set) should be relative (default), i.e. incidence rate ratios and ratios of relative risks, or absolute. |
msq |
Integer, the denominator of the population density, default is hectares (population per 10,000m^2) |
rr_lim |
Integer, for plotting the relative risk, the maximum value of the colour scale. Useful when comparing multiple plots to put colour gradient on same scale. |
... |
... |
A list of two ggplot objects. The first is the incidence (or change in incidence) the
second is a plot of four components: (i) the expected case count in each cell, (ii) the
relative risk due to included covariates, (iii) the relative risk associated with the
latent Gaussian process, and (iv) the posterior standard deviation of the incidence. An object
outl
is exported to the global environment to reduce needing to reload sampling
data on further calls to the same lgcpReal
object. This can be removed if needed as
it can be large.
aggregator, plot_hotspot, generate_report
1 2 3 4 5 6 7 8 9 10 | 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(lg1,square_pop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.