Lgumbel {durham} | R Documentation |
Calculates the log-likelihood of the given data from the Gumbel distribution for one or more values of the parameters
Lgumbel(a, b, x=seaheights)
a |
Parameter a of the Gumbel distribution |
b |
Parameter a of the Gumbel distribution |
x |
Data, defaults to seaheights |
Returns a vector of log-likelihood values
Peter Craig <P.S.Craig@durham.ac.uk>
## The function is currently defined as function (a, b, x = seaheights) { a <- as.vector(a) b <- as.vector(b) n <- length(x) w <- matrix(x, nrow = length(a), ncol = n, byrow = T) w <- w - a w <- w/b one <- rep(1, n) (-log(b) - w - exp(-w)) }