liouv.maxim: Maximization of Liouville copula likelihood function

View source: R/liouville.R

liouv.maximR Documentation

Maximization of Liouville copula likelihood function

Description

Two methods, either numerical optimization or method-of-moments

Usage

liouv.maxim(
  data,
  family,
  interval,
  boundary = NULL,
  lattice.mat = NULL,
  return_all = FALSE,
  MC.approx = TRUE
)

Arguments

data

sample matrix from a Liouville copula

family

family of the Liouville copula. Either "clayton", "gumbel", "frank", "AMH" or "joe"

interval

interval over which to look for theta (bounds for Nelder-Mead)

boundary

vector of endpoints for search of Dirichlet allocation parameters. Either boundary or lattice.mat can be supplied

lattice.mat

matrix of tuples of Dirichlet allocation parameters at which to evaluate the likelihood

return_all

should all results (as list) or only maximum value be returned. Defaults to FALSE

MC.approx

whether to use Monte-Carlo approximation for the inverse survival function (default is TRUE)

Details

A wrapper to optim using the Nelder-Mead algorithm or using the methods of moments, to maxime pointwise given every alphavec over a grid. Returns the maximum for alphavec and theta.

Value

a list with values of theta and Dirichlet parameter along with maximum found. Gives index of maximum amongst models fitted.

Examples

## Not run: 
 data <- rliouv(n=100, family="joe", alphavec=c(1,2), theta=2)
 liouv.maxim(data=data, family="j", interval=c(1.25,3), boundary=c(2,2),return_all=TRUE)
 lattice.mat <- t(combn(1:3,2))
 liouv.maxim(data=data, family="j", interval=c(1.25,3), lattice.mat=lattice.mat, return_all=FALSE)
 #data <- rliouv(n=1000, family="gumbel", alphavec=c(1,2), theta=2)
 liouv.maxim.mm(data=data, family="gumbel", boundary=c(3,3),return_all=TRUE)
 lattice.mat <- t(combn(1:3,2))
 liouv.maxim.mm(data=data, family="gumbel", lattice.mat=lattice.mat, return_all=FALSE)

## End(Not run)

lcopula documentation built on April 21, 2023, 9:07 a.m.