CondiCopLikCV {LocalCop}R Documentation

Cross-validated likelihood.

Description

Leave-one-out local likelihood copula parameter estimates are interpolated, then used to calculate the conditional copula likelihood function.

Usage

CondiCopLikCV(
  u1,
  u2,
  family,
  x,
  xind = 100,
  degree = 1,
  eta,
  nu,
  kernel = KernEpa,
  band,
  optim_fun,
  cveta_out = FALSE,
  cv_all = FALSE,
  cl = NA
)

Arguments

u1

Vector of first uniform response.

u2

Vector of second uniform response.

family

An integer defining the bivariate copula family to use. See ConvertPar().

x

Vector of observed covariate values.

xind

Vector of indices in sort(x) at which to calculate leave-one-out parameter estimates. Can also be supplied as a single integer, in which case xind equally spaced observations are taken from x.

degree

Integer specifying the polynomial order of the local likelihood function. Currently only 0 and 1 are supported.

eta, nu, kernel, band, optim_fun, cl

See CondiCopLocFit().

cveta_out

If TRUE, return the CV estimate of eta at each point in x in addition to the CV log-likelihood.

cv_all

If FALSE, evaluate the CV likelihood at only the leave-one-out observations specified by xind. Otherwise, interpolate the leave-one-out estimates of eta to all values in x, and evaluate the CV likelihood at all observations.

Value

If cveta_out = FALSE, scalar value of the cross-validated log-likelihood. Otherwise, a list with elements:

x

The sorted values of x.

eta

The leave-one-out estimates interpolated from the values in xind to all of those in x.

nu

The scalar value of the estimated (or provided) second copula parameter.

loglik

The cross-validated log-likelihood.

See Also

This function is typically used in conjunction with CondiCopSelect(); see example there.


[Package LocalCop version 0.0.1 Index]