View source: R/nphawkes_functions.R
trig_plots | R Documentation |
This function exports histogram estimators for all utilized triggering components. Plots show estimated value of triggering functions for each bin along with +/- 2 standard errors bars
trig_plots( model, time_xlim = c(min(model$time_breaks), max(model$time_breaks)), space_xlim = c(min(model$space_breaks), max(model$space_breaks)), mark_xlim = c(min(model$mark_breaks), max(model$mark_breaks)), time_ticks = NULL, space_ticks = NULL, mark_ticks = NULL, time_ylim = c(0, NA), space_ylim = c(0, NA), mark_ylim = c(0, NA), mag_label = "magnitude", se_include = TRUE )
model |
the output from |
time_xlim |
vector of minimum and maximum x-axis value shown in the temporal plot |
space_xlim |
vector of minimum and maximum x-axis value shown in the spatial plot |
mark_xlim |
vector of minimum and maximum x-axis value shown in the magnitude plot |
time_ylim |
vector of minimum and maximum y-axis value shown in the temporal plot |
space_ylim |
vector of minimum and maximum y-axis value shown in the spatial plot |
mark_ylim |
vector of minimum and maximum y-axis value shown in the magnitude plot |
mag_label |
character string representing what the magnitude measures |
se_include |
TRUE to include standard error estimates for bins of triggering components, FALSE to exclude them from the visualizations |
Depending on bin size, x-axis labels may overlap, impairing readability. Axis tick marks may be changed for plots
using scale_x_continuous()
within the ggplot2
library.
all_plots
is a cowplot object of histogram estimators for all utilized triggering components
time_plot
is a ggplot object of the histogram estimator for the temporal effect
space_plot
is a ggplot object of the histogram estimator for the spatial effect,
NULL if data provided is not a spatial process
mark_plot
is a ggplot object of the histogram estimator for the mark effect,
NULL if data provided is not a marked process
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) tp = trig_plots(out, time_xlim = c(0, 2), space_xlim = c(0, 10), mark_xlim = c(3.9, 5.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.