# GLM.jl module : 1 test failed

**URL:** <https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567>\
**Category:** Statistics\
**Tags:** glm\
**Created:** [April 26, 2018, 9:57pm UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567 "2018-04-26T21:57:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hung-q-ngo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hung-q-ngo/32/4029_2.png) [@hung-q-ngo](https://discourse.julialang.org/u/hung-q-ngo)\
**Post date:** [April 26, 2018, 9:57pm UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567/1 "2018-04-26T21:57:33Z")

</div>

Hello, any idea what I did wrong here? (I have `julia version 0.6.2`, and latest `GLM.jl` package). I was running

`~/repos/git/GLM.jl/test$ julia runtests.jl`

and got

```julia
WARNING: Method definition ==(Base.Nullable{S}, Base.Nullable{T}) in module Base at nullable.jl:238 overwritten in module NullableArrays at /home/hungngo/.julia/v0.6/NullableArrays/src/operators.jl:99.
WARNING: ccdf(d::UnivariateDistribution, X::AbstractArray) is deprecated, use ccdf.(d, X) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] ccdf(::Distributions.FDist{Float64}, ::Array{Float64,1}) at ./deprecated.jl:57
 [3] coeftable(::GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}}) at /home/hungngo/.julia/v0.6/GLM/src/lm.jl:154
 [4] coeftable(::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/.julia/v0.6/DataFrames/src/statsmodels/statsmodel.jl:93
 [5] show(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/.julia/v0.6/DataFrames/src/statsmodels/statsmodel.jl:104
 [6] test_show(::DataFrames.DataFrameRegressionModel{GLM.LinearModel{GLM.LmResp{Array{Float64,1}},GLM.DensePredChol{Float64,Base.LinAlg.Cholesky{Float64,Array{Float64,2}}}},Array{Float64,2}}) at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:5
 [7] macro expansion at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:15 [inlined]
 [8] macro expansion at ./test.jl:860 [inlined]
 [9] anonymous at ./<missing>:?
 [10] include_from_node1(::String) at ./loading.jl:576
 [11] include(::String) at ./sysimg.jl:14
 [12] process_options(::Base.JLOptions) at ./client.jl:305
 [13] _start() at ./client.jl:371
while loading /home/hungngo/repos/git/GLM.jl/test/runtests.jl, in expression starting on line 13
lm: Error During Test
  Got an exception of type MethodError outside of a @test
  MethodError: no method matching fit(::Type{GLM.LinearModel}, ::Array{Float64,2}, ::Array{Float64,1}, ::Bool)
  Closest candidates are:
    fit(!Matched::Type{StatsBase.Histogram}, ::Any...; kwargs...) at /home/hungngo/.julia/v0.6/StatsBase/src/hist.jl:339
    fit(!Matched::StatsBase.StatisticalModel, ::Any...) at /home/hungngo/.julia/v0.6/StatsBase/src/statmodels.jl:99
    fit(!Matched::Type{D<:Distributions.Distribution}, ::Any...) where D<:Distributions.Distribution at /home/hungngo/.julia/v0.6/Distributions/src/genericfit.jl:34
    ...
  Stacktrace:
   [1] macro expansion at /home/hungngo/repos/git/GLM.jl/test/runtests.jl:33 [inlined]
   [2] macro expansion at ./test.jl:860 [inlined]
   [3] anonymous at ./<missing>:?
   [4] include_from_node1(::String) at ./loading.jl:576
   [5] include(::String) at ./sysimg.jl:14
   [6] process_options(::Base.JLOptions) at ./client.jl:305
   [7] _start() at ./client.jl:371
Test Summary: | Pass Error Total
lm | 15 1 16
ERROR: LoadError: Some tests did not pass: 15 passed, 0 failed, 1 errored, 0 broken.

```

At the same time, if `Pkg.test("GLM")` is run then all tests passed, but only `15` tests were run for the `lm` portion instead of `16`. So I suppose the error above is a known error?

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [April 27, 2018, 6:52am UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567/2 "2018-04-27T06:52:11Z")

</div>

Can you define “latest”? It does seem you’re using an old GLM.jl version. See [How to upgrade from DataFrames 0.10.1 to 0.11.3?](https://discourse.julialang.org/t/how-to-upgrade-from-dataframes-0-10-1-to-0-11-3/8243)

---

<div class="post-metadata">

**Author:** ![hung-q-ngo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hung-q-ngo/32/4029_2.png) [@hung-q-ngo](https://discourse.julialang.org/u/hung-q-ngo)\
**Post date:** [April 27, 2018, 9:14pm UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567/3 "2018-04-27T21:14:16Z")

</div>

Thank you @nalimilan, that solved my problem. FWIW, the issue was the following

- I have `Gladfly` package installed, which downgrades a bunch of other packages

```julia
INFO: Downgrading CSV: v0.2.4 => v0.1.5
INFO: Downgrading CategoricalArrays: v0.3.9 => v0.1.6
INFO: Downgrading DataFrames: v0.11.6 => v0.10.1
INFO: Downgrading DataStreams: v0.3.4 => v0.1.3
INFO: Downgrading GLM: v0.10.1 => v0.8.1

```

- So even after running `Pkg.update()`, `DataFrames` and `GLM` are not updated to the latest versions, causing some of the `GLM.jl`’s tests to fail.
- After removing `Gladfly`, all tests passed as expected.

_Followup Question_: is there a principled way of detecting such problems to avoid wasting half a day tracing down latest version numbers?

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [April 28, 2018, 8:05am UTC](https://discourse.julialang.org/t/glm-jl-module-1-test-failed/10567/4 "2018-04-28T08:05:57Z")

</div>

> [@hung-q-ngo](#):
>
> Followup Question: is there a principled way of detecting such problems to avoid wasting half a day tracing down latest version numbers?

Not really at the moment. But see [How to find package preventing others from updating](https://discourse.julialang.org/t/how-to-find-package-preventing-others-from-updating/8235).
