Lgumbel: Gumbel Distribution Log-likelihood

Description Usage Arguments Value Author(s) Examples

View source: R/Lgumbel.R

Description

Calculates the log-likelihood of the given data from the Gumbel distribution for one or more values of the parameters

Usage

1
Lgumbel(a, b, x=seaheight)

Arguments

a

Parameter a of the Gumbel distribution

b

Parameter a of the Gumbel distribution

x

Data, defaults to seaheights

Value

Returns a vector of log-likelihood values

Author(s)

Peter Craig <P.S.Craig@durham.ac.uk>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## The function is currently defined as
function (a, b, x = seaheight)
{
    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)) 
  }

louisaslett/durham-Rpkg documentation built on Oct. 20, 2020, 4:29 a.m.