log_likelihood_copula_model: Computes loglikelihood for a given copula model

View source: R/likelihood_copula_models.R

log_likelihood_copula_modelR Documentation

Computes loglikelihood for a given copula model

Description

log_likelihood_copula_model() computes the loglikelihood for a given bivariate copula model and data set while allowin for right-censoring of both outcome variables.

Usage

log_likelihood_copula_model(
  theta,
  X,
  Y,
  d1,
  d2,
  copula_family,
  cdf_X,
  cdf_Y,
  pdf_X,
  pdf_Y
)

Arguments

theta

Copula parameter

X

Numeric vector corresponding to first outcome variable.

Y

Numeric vector corresponding to second outcome variable.

d1

An integer vector. Indicates whether first variable is observed or right-censored,

  • d1[i] = 1 if u[i] corresponds to non-censored value

  • d1[i] = 0 if u[i] corresponds to right-censored value

  • d1[i] = -1 if u[i] corresponds to left-censored value

d2

An integer vector. Indicates whether first variable is observed or right-censored,

  • d2[i] = 1 if v[i] corresponds to non-censored value

  • d2[i] = 0 if v[i] corresponds to right-censored value

  • d2[i] = -1 if v[i] corresponds to left-censored value

copula_family

Copula family, one of the following:

  • "clayton"

  • "frank"

  • "gumbel"

  • "gaussian"

cdf_X

Distribution function for the first outcome variable.

cdf_Y

Distribution function for the second outcome variable.

pdf_X

Density function for the first outcome variable.

pdf_Y

Density function for the second outcome variable.

Value

Loglikelihood of the bivariate copula model evaluated in the observed data.


Surrogate documentation built on June 22, 2024, 9:16 a.m.