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

Description Usage Arguments Value Examples

View source: R/lrt_copula.R

Description

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

Usage

1
lrt_copula(model1, model2)

Arguments

model1

The output of the larger model

model2

The output of the smaller model

Value

the LRT statistics, p value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#' # 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)

CopulaCenR documentation built on March 1, 2021, 5:06 p.m.