Re-exported functions for interacting with Julia model objects
Source:R/model-helpers.R
jlme-model-reexports.Rd
Re-exported functions for interacting with Julia model objects
Examples
# \donttest{
jlme_setup(restart = TRUE)
#> Starting Julia (v1.10.5) ...
#> Successfully set up Julia connection. (13s)
x <- jlmer(r2 ~ Anger + (1 | id), lme4::VerbAgg, family = "binomial")
# `propertynames()` lists properties accessible via `$`
propertynames(x)
#> [1] "A" "L" "LMM" "PCA" "X" "b"
#> [7] "beta" "coef" "corr" "lowerbd" "objective" "rePCA"
#> [13] "resp" "sigma" "theta" "u" "vcov" "wt"
#> [19] "y" "β" "θ" "λ" "σ" "σs"
#> [25] "σρs"
# `issingular()` reports whether model has singular fit
issingular(x)
#> [1] FALSE
# `likelihoodratiotest()` conducts a likelihood-ratio test between nested models
likelihoodratiotest(
x,
jlmer(r2 ~ 1 + (1 | id), lme4::VerbAgg, family = "binomial")
)
#> <Julia object of type MixedModels.LikelihoodRatioTest>
#> Model Formulae
#> 1: r2 ~ 1 + (1 | id)
#> 2: r2 ~ 1 + Anger + (1 | id)
#> ──────────────────────────────────────────────────
#> model-dof deviance χ² χ²-dof P(>χ²)
#> ──────────────────────────────────────────────────
#> [1] 2 9510.5478
#> [2] 3 9499.3324 11.2154 1 0.0008
#> ──────────────────────────────────────────────────
stop_julia()
# }