Skip to contents

Likelihood-ratio test that n_boundary variance-type components are jointly 0, from the two maximised log-likelihoods of a full model and a reduced model with those components fixed at 0. Wraps chibar2_pvalue(); see that function for the exact formula and its scope (independent boundary components, regular Fisher information elsewhere).

Usage

variance_lrt(ll_full, ll_reduced, n_boundary = 1L)

Arguments

ll_full, ll_reduced

Single numeric maximised log-likelihoods for the full and reduced models.

n_boundary

A single positive integer: the number of boundary variance components being tested. Default 1L.

Value

A list with elements LRT, pvalue (from chibar2_pvalue()), and n_boundary.

Examples

variance_lrt(ll_full = -100.2, ll_reduced = -102.1, n_boundary = 1)
#> $LRT
#> [1] 3.8
#> 
#> $pvalue
#> [1] 0.02562629
#> 
#> $n_boundary
#> [1] 1
#>