The degrees of freedom are the DIFFERENCE IN DIMENSION, not the number of parameters in either model. A negative statistic is raised rather than clamped to zero.
References
Wasserman (2004), All of Statistics, Definition 10.21 and Theorem 10.22, under which lambda converges to chi^2 with r - q degrees of freedom, "the dimension of Theta minus the dimension of Theta_0".
Examples
# nested normal models: the full model frees one mean
Lrtest(loglik_full = -140.2, loglik_null = -143.9, df = 1)
#> $statistic
#> [1] 7.4
#>
#> $p_value
#> [1] 0.006522388
#>
#> $df
#> [1] 1
#>
#> $loglik_full
#> [1] -140.2
#>
#> $loglik_null
#> [1] -143.9
#>
#> $method
#> [1] "Likelihood ratio test, Wasserman Theorem 10.22"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
