Description Usage Arguments Value Author(s) Examples
Functions to compute the negative log-likelihood of a GEV distribution. Whereas this can be used for other purpose, this also allows in particular to compute the log-posterior with diffuse normal priors. Note that we could add parameters to control the informativness of the priors, but as we have no reliable information, we decide to arbitrarily fix it to large values, to improve computation . (More parameters are harmful for computation time)
1 2 3 4 5 | gev.nloglik(mu, sig, xi, data)
log_post_gumb(mu, logsig, data, ic = F)
log_post0(mu, logsig, xi, data, ic = F)
|
mu |
numeric representig the location parameter of the GEV |
sig |
or |
xi |
numeric representig the shape parameter of the GEV |
data |
numeric vector representing the data (GEV) of interest. |
a numeric value representing the negative log-likelihood or the log-posterior of interest.
Antoine Pissoort, antoine.pissoort@student.uclouvain.be
1 2 3 4 5 6 7 | data('max_years')
# Optimize the log-Posterior Density Function to find starting values
fn <- function(par, data) -log_post0(par[1], par[2], par[3], data)
param <- c(mean(max_years$df$Max),log(sd(max_years$df$Max)), 0.1 )
opt <- nlm(fn, param, data = max_years$data,
hessian=T, iterlim = 1e5)
start <- opt$estimate
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.