Learn R Programming

Surrogate (version 3.3.3)

fit_copula_submodel_OrdOrd: Fit ordinal-continuous copula submodel

Description

The fit_copula_submodel_OrdOrd() function fits the copula (sub)model for an ordinal surrogate and true endpoint with maximum likelihood.

Usage

fit_copula_submodel_OrdOrd(
  X,
  Y,
  copula_family,
  start_copula,
  method = "BFGS",
  K_X,
  K_Y,
  names_XY = c("Surr", "True"),
  twostep = FALSE,
  ...
)

Value

A list with five elements:

  • ml_fit: object of class maxLik::maxLik that contains the estimated copula model.

  • marginal_X: list with the estimated cdf, pdf/pmf, and inverse cdf for X.

  • marginal_Y: list with the estimated cdf, pdf/pmf, and inverse cdf for X.

  • copula_family: string that indicates the copula family

  • data: data frame containing X and Y

  • names_XY: The names (i.e., "Surr" and "True") for X and Y

Arguments

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"

start_copula

Starting value for the copula parameter.

method

Optimization algorithm for maximizing the objective function. For all options, see ?maxLik::maxLik. Defaults to "BFGS".

K_X

Number of categories in X.

K_Y

Number of categories in Y.

names_XY

Names for X and Y, respectively.

twostep

(boolean) If TRUE, the starting values are fixed for the marginal distributions and only the copula parameter is estimated.

...

Extra argument to pass onto maxLik::maxLik