Skip to content

Commit 1eb5924

Browse files
dep from StatsFuns instead of Distributions (#195)
* dep from StatsFuns instead of Distributions StatsModels should remain as ligthweight as possible. `Distribution` depends on `StatsFuns`, but also on packages such as`StaticArrays` that create a lot of invalidation. On my computer, this decreases `using StatsModels` by a third. * Update Project.toml
1 parent cf2171c commit 1eb5924

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name = "StatsModels"
22
uuid = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
3-
version = "0.6.14"
3+
version = "0.6.15"
44

55
[deps]
66
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
8-
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
98
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
109
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1110
ShiftedArrays = "1277b4bf-5013-50f5-be3d-901d8477a67a"
1211
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1312
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
13+
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
1414
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1515

1616
[compat]
1717
CategoricalArrays = "0.8"
1818
DataAPI = "1.1"
1919
DataFrames = "0.21"
2020
DataStructures = "0.17.0, 0.18"
21-
Distributions = "0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23"
2221
ShiftedArrays = "1.0.0"
2322
StatsBase = "0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33"
23+
StatsFuns = "0.9"
2424
Tables = "0.2, 1"
2525
julia = "1"
2626

src/StatsModels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using DataStructures
88
using DataAPI
99
using DataAPI: levels
1010
using Printf: @sprintf
11-
using Distributions: Chisq, ccdf
11+
using StatsFuns: chisqccdf
1212

1313
using SparseArrays
1414
using LinearAlgebra

src/lrtest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function lrtest(mods::StatisticalModel...; atol::Real=0.0)
116116
"in models with more degrees of freedom"))
117117
end
118118

119-
pval = (NaN, ccdf.(Chisq.(abs.(Δdf)), abs.(Δdev))...)
119+
pval = (NaN, chisqccdf.(abs.(Δdf), abs.(Δdev))...)
120120
return LRTestResult(Int(nobs(mods[1])), dev, df, pval)
121121
end
122122

0 commit comments

Comments
 (0)