gev_grad: GEV gradient function

View source: R/gev.R

gev_gradR Documentation

GEV gradient function

Description

Function to calculate gradient of parameters, accounting for non-stationarity

Usage

gev_grad(
  theta,
  muX,
  sigX,
  xiX,
  z,
  mulink = "identity",
  siglink = "exponential",
  xilink = "identity"
)

Arguments

theta

vector of parameters, for each of location, scale and shape (in that order)

muX

model matrix for the location parameter

sigX

model matrix for the scale parameter

xiX

model matrix for the shape parameter

z

vector of observed maxima

mulink

string describing what link function to use for the location parameter

siglink

string describing what link function to use for the scale parameter

xilink

string describing what link function to use for the shape parameter

Details

For the purposes of optimisation, this function takes the same arguments as gev_likfit so it can be passed into the optim function.

Value

vector of gradients for each parameter


dannyjameswilliams/danielR documentation built on Aug. 20, 2023, 3:25 a.m.