From fbdb603cb5359272ea9923a150a02e0a8df41eb6 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Sat, 17 Jul 2021 21:14:07 +0000 Subject: [PATCH] Compat + Version bump (#53) * version + compat bumps * maxlog for some things --- .github/workflows/ci.yml | 2 +- Project.toml | 4 ++-- src/glmerMod.jl | 6 +++--- src/utilities.jl | 9 ++------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09752b4..c7ee02a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: version: - - '1.4' + # - '1.6' - '1' R: - '4.0' diff --git a/Project.toml b/Project.toml index 3eb53e9..7d60706 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JellyMe4" uuid = "19ac8677-9a15-4623-9afd-84acc6165ce7" authors = ["Phillip Alday "] -version = "0.2.4" +version = "0.2.5" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" @@ -25,7 +25,7 @@ RCall = "0.13" StatsBase = "0.31, 0.32, 0.33" StatsModels = "0.6.8" Tables = "0.2, 1.0" -julia = "1.4" +julia = "1.6" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/glmerMod.jl b/src/glmerMod.jl index 80ba756..58fb521 100644 --- a/src/glmerMod.jl +++ b/src/glmerMod.jl @@ -229,9 +229,9 @@ function sexp(::Type{RClass{:glmerMod}}, x::Tuple{GeneralizedLinearMixedModel{T} @debug r @warn """Some accuracy is lost in translation for GLMMs. This is fine with plotting, but proceed with caution for inferences. You can try letting the model "reconverge" in lme4 with - update(model, control=glmerControl(optimizer="nloptwrap", calc.derivs=FALSE)).""" - @info "lme4 handles deviance for GLMMs differently than MixedModels.jl" - @info "for the correct comparison, examine -2*logLik(RModel) and deviance(JuliaModel)" + update(model, control=glmerControl(optimizer="nloptwrap", calc.derivs=FALSE)).""" maxlog=1 + @info "lme4 handles deviance for GLMMs differently than MixedModels.jl" maxlog=1 + @info "for the correct comparison, examine -2*logLik(RModel) and deviance(JuliaModel)" maxlog=1 r = reval(r) r = protect(sexp(r)) unprotect(1) diff --git a/src/utilities.jl b/src/utilities.jl index cee8a83..b15cc44 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -53,8 +53,6 @@ this of course has a side effect: it changes the R dataframe function set_r_contrasts!(rdfname, formula) fixefform = first(formula.rhs) - warned_on_contrasts = false - for tt in fixefform.terms if typeof(tt) <: CategoricalTerm R""" @@ -73,11 +71,8 @@ function set_r_contrasts!(rdfname, formula) # then this should be handled by the coding of the first-order terms # if you are doing something that crazy, then you know enough linear algebra # to copy and interpret the relevant matrices directly - if !warned_on_contrasts - @info "contrasts on interaction terms are assumed to decompose into products of contrasts on the first-order terms" - @info "(if you don't know what that means, you're probably fine)" - warned_on_contrasts = true - end + @info "contrasts on interaction terms are assumed to decompose into products of contrasts on the first-order terms" maxlog=1 + @info "(if you don't know what that means, you're probably fine)" maxlog=1 end end rdfname