Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export(example_loglik_array)
export(example_loglik_matrix)
export(extract_log_lik)
export(find_model_names)
export(gpdfit)
export(is.kfold)
export(is.loo)
export(is.psis)
Expand Down
99 changes: 0 additions & 99 deletions R/gpdfit.R

This file was deleted.

4 changes: 2 additions & 2 deletions R/psis.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ psis_smooth_tail <- function(x, cutoff) {
exp_cutoff <- exp(cutoff)

# save time not sorting since x already sorted
fit <- gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
fit <- posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
k <- fit$k
sigma <- fit$sigma
if (is.finite(k)) {
p <- (seq_len(len) - 0.5) / len
qq <- qgpd(p, k, sigma) + exp_cutoff
qq <- posterior::qgeneralized_pareto(p, 0, sigma, k) + exp_cutoff
tail <- log(qq)
} else {
tail <- x
Expand Down
4 changes: 2 additions & 2 deletions R/psislw.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ psislw <- function(lw, wcp = 0.2, wtrunc = 3/4,
# body and gPd smoothed tail
tail_ord <- order(x_tail)
exp_cutoff <- exp(cutoff)
fit <- gpdfit(exp(x_tail) - exp_cutoff, wip=FALSE, min_grid_pts = 80)
fit <- posterior::gpdfit(exp(x_tail) - exp_cutoff, wip=FALSE, min_grid_pts = 80)
k <- fit$k
sigma <- fit$sigma
prb <- (seq_len(tail_len) - 0.5) / tail_len
qq <- qgpd(prb, k, sigma) + exp_cutoff
qq <- posterior::qgeneralized_pareto(prb, 0, sigma, k) + exp_cutoff
smoothed_tail <- rep.int(0, tail_len)
smoothed_tail[tail_ord] <- log(qq)
x_new <- x
Expand Down
44 changes: 0 additions & 44 deletions man/gpdfit.Rd

This file was deleted.

Loading