log_post0: Negative GEV log-likelihood and Log-Posterior with...

Description Usage Arguments Value Author(s) Examples

Description

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)

Usage

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)

Arguments

mu

numeric representig the location parameter of the GEV

sig

or logsig are numeric representig the scale parameter of the GEV. BE CAREFULL : this is in logarithm for the log_post0 only in order to avoid computational problems later in the MCMC's.

xi

numeric representig the shape parameter of the GEV

data

numeric vector representing the data (GEV) of interest.

Value

a numeric value representing the negative log-likelihood or the log-posterior of interest.

Author(s)

Antoine Pissoort, antoine.pissoort@student.uclouvain.be

Examples

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

proto4426/PissoortThesis documentation built on May 26, 2019, 10:31 a.m.