Learn R Programming

ffaframework (version 0.1.0)

plot_sffa_fit: Plot Fitted Probability Distribution for S-FFA

Description

Generates a plot showing the probability density of a stationary model (left panel) and the data (right panel).

Usage

plot_sffa_fit(results, show_line = TRUE, ...)

Value

ggplot; a plot showing:

  • The likelihood function of the distribution plotted vertically on the left panel.

  • The data, connected with a line if show_line == TRUE, on the right panel.

Arguments

results

A fitted flood frequency model generated by fit_lmoments(), fit_mle() or fit_gmle().

show_line

If TRUE (default), draw a fitted line through the data.

...

Optional named arguments: 'title', 'xlabel', and 'ylabel'.

Examples

Run this code
data <- rnorm(n = 100, mean = 100, sd = 10)
years <- seq(from = 1901, to = 2000)
results <- fit_lmoments(data, "WEI")
plot_sffa_fit(results)

Run the code above in your browser using DataLab