ordinal_ordinal_loglik: Loglikelihood function for ordinal-ordinal copula model

View source: R/fit_model_OrdOrd_copula.R

ordinal_ordinal_loglikR Documentation

Loglikelihood function for ordinal-ordinal copula model

Description

ordinal_ordinal_loglik() computes the observed-data loglikelihood for a bivariate copula model with two ordinal endpoints. The model is based on a latent variable representation of the ordinal endpoints.

Usage

ordinal_ordinal_loglik(para, X, Y, copula_family, K_X, K_Y, return_sum = TRUE)

Arguments

para

Parameter vector. The parameters are ordered as follows:

  • para[1:p1]: Cutpoints for the latent distribution of X corresponding to c_1^X, \dots, c_{K_X - 1}^X (see Details).

  • para[(p1 + 1):(p1 + p2)]: Cutpoints for the latent distribution of Y corresponding to c_1^Y, \dots, c_{K_Y - 1}^Y (see Details).

  • para[p1 + p2 + 1]: copula parameter

X

First variable (Ordinal with K_X categories)

Y

Second variable (Ordinal with K_Y categories)

copula_family

Copula family, one of the following:

  • "clayton"

  • "frank"

  • "gumbel"

  • "gaussian"

K_X

Number of categories in X.

K_Y

Number of categories in Y.

return_sum

Return the sum of the individual loglikelihoods? If FALSE, a vector with the individual loglikelihood contributions is returned.

Details

Vine Copula Model for Ordinal Endpoints

Following the Neyman-Rubin potential outcomes framework, we assume that each patient has four potential outcomes, two for each arm, represented by \boldsymbol{Y} = (T_0, S_0, S_1, T_1)'. Here, \boldsymbol{Y_z} = (S_z, T_z)' are the potential surrogate and true endpoints under treatment Z = z.

The latent variable notation and D-vine copula model for \boldsymbol{Y} is a straightforward extension of the notation in ordinal_continuous_loglik().

Observed-Data Likelihood

In practice, we only observe (S_0, T_0)' or (S_1, T_1)'. Hence, to estimate the (identifiable) parameters of the D-vine copula model, we need to derive the observed-data likelihood. The observed-data loglikelihood for (S_z, T_z)' is as follows:

f_{\boldsymbol{Y_z}}(s, t; \boldsymbol{\beta}) = P \left( c^{S_z}_{s - 1} < \tilde{S}_z, c^{T_z}_{t - 1} < \tilde{T}_z \right) - P \left( c^{S_z}_{s} < \tilde{S}_z, c^{T_z}_{t - 1} < \tilde{T}_z \right) - P \left( c^{S_z}_{s - 1} < \tilde{S}_z, c^{T_z}_{t} < \tilde{T}_z \right) + P \left( c^{S_z}_{s} < \tilde{S}_z, c^{T_z}_{t} < \tilde{T}_z \right).

The above expression is used in ordinal_ordinal_loglik() to compute the loglikelihood for the observed values for Z = 0 or Z = 1.

Value

(numeric) loglikelihood value evaluated in para.


Surrogate documentation built on April 11, 2025, 6:09 p.m.