ci_plot: Plot of Conditional Intensity Over Time

View source: R/nphawkes_functions.R

ci_plotR Documentation

Plot of Conditional Intensity Over Time

Description

In this function, the estimated conditional intensity is plotted against the number of events. The estimated conditional intensity is found by taking the median value in each month and multiplying it by the number of days in that month.

Usage

ci_plot(
  model,
  min_date = model$input$ref_date,
  max_date = model$data$dates[nrow(model$data)],
  superthin
)

Arguments

model

the output from misd()

min_date

the minimum date to be shown on the plot

max_date

the maximum date to be shown on the plot

superthin

the output from super_thin()

Value

a plot that shows the estimated conditional intensity as a black line with the number of monthly events as gray vertical lines

Examples

data("hm.csv")
out = misd(dates = hm$t,
   ref_date = "1999-10-16",
   lat = hm$lat,
   lon = hm$lon,
   marks = hm$m,
   time_breaks = c(0,0.1, 0.5, 1,7,93,600),
   space_breaks = c(0,0.5, 1, 10, 25, 100),
   mark_breaks = c(3, 3.1,3.3, 4, 5, 8),
   just_times = T)
st = super_thin(out)
ci_p = ci_plot(out, st)


boydpe/nphawkes documentation built on March 31, 2022, 11:03 a.m.