Learn R Programming

CopulaCenR (version 1.2.3)

lrt_copula: Likelihood-ratio test for covariate effect(s) in copula models

Description

This function (lrt_copula) is used to perform the likelihood ratio test (LRT) between two nested copula models

Usage

lrt_copula(model1, model2)

Value

the LRT statistics, p value

Arguments

model1

The output of the larger model

model2

The output of the smaller model

Examples

Run this code
#' # Likelihood-ratio test for "rs2284665" in AREDS data
data(AREDS)
# Fit null model without "rs2284665"
copula2_sp_null <- ic_spTran_copula(data = AREDS, copula = "Copula2",
                   l = 0, u = 15, m = 3, r = 3,
                   var_list = c("SevScaleBL"))
# Fit full model
copula2_sp <- ic_spTran_copula(data = AREDS, copula = "Copula2",
              l = 0, u = 15, m = 3, r = 3,
              var_list = c("rs2284665","SevScaleBL"))
lrt_copula(model1 = copula2_sp, model2 = copula2_sp_null)

Run the code above in your browser using DataLab