Graft Distribution
graft.Rd
Replace a distribution's tail.
graft_left()
takes a base distribution and grafts a distribution
to the left of some breakpoint; graft_right()
grafts a distribution
to the right. The distribution being grafted is sliced at a breakpoint
and fit to the base distribution also at that breakpoint.
Usage
graft_right(distribution, graft, breakpoint, include = FALSE)
graft_left(distribution, graft, breakpoint, include = FALSE)
is_graft(object)
Examples
set.seed(1)
x <- stats::rcauchy(100)
base <- distionary::dst_empirical(x)
q <- distionary::eval_quantile(base, at = 0.9)
right <- distionary::dst_gpd(q, 5, 1)
g <- graft_right(base, right, breakpoint = q)
#plot(g, "cdf", n = 1001, to = 34)
#plot(base, "cdf", n = 1001, lty = 2, add = TRUE)