gev.d.lik: d-GEV Likelihood

Description Usage Arguments Value Examples

View source: R/gevdfit.R

Description

Computes (log-) likelihood of d-GEV model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gev.d.lik(
  xdat,
  ds,
  mut,
  sigma0,
  xi,
  theta,
  eta,
  log = FALSE,
  tau = 0,
  eta2 = NULL
)

Arguments

xdat

numeric vector containing observations

ds

numeric vector containing corresponding durations (1/60 corresponds to 1 minute, 1 corresponds to 1 hour)

mut, sigma0, xi, theta, eta, eta2, tau

numeric vectors containing corresponding estimates for each of the parameters

log

Logical; if TRUE, the log likelihood is returned.

Value

single value containing (log) likelihood

Examples

1
2
3
4
5
6
7
8
# compute log-likelihood of observation values not included in fit
train.set <- example[example$d!=2,]
test.set <- example[example$d==2,]
fit <- gev.d.fit(train.set$dat,train.set$d,mutl = c(1,2),sigma0l = 1
          ,ydat = as.matrix(train.set[c('cov1','cov2')]))
params <- gev.d.params(fit,ydat = as.matrix(test.set[c('cov1','cov2')]))
gev.d.lik(xdat = test.set$dat,ds = test.set$d,mut = params[,1],sigma0 = params[,2],xi = params[,3]
          ,theta = params[,4],eta = params[,5],log=TRUE)

IDF documentation built on April 9, 2021, 5:07 p.m.