diff --git a/Project.toml b/Project.toml index ea73e8f5..ee61bdac 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GLM" uuid = "38e38edf-8417-5370-95a0-9cbb8c7f171a" -version = "1.6.0" +version = "1.6.1" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/src/GLM.jl b/src/GLM.jl index 768d9613..3f7d10b3 100644 --- a/src/GLM.jl +++ b/src/GLM.jl @@ -18,7 +18,7 @@ module GLM import StatsModels: hasintercept export coef, coeftable, confint, deviance, nulldeviance, dof, dof_residual, loglikelihood, nullloglikelihood, nobs, stderror, vcov, residuals, predict, - fitted, fit, fit!, model_response, response, modelmatrix, r2, r², adjr2, adjr², + fitted, fit, fit!, model_response, response, modelmatrix, r2, r², adjr2, adjr², cooksdistance, hasintercept export @@ -81,6 +81,12 @@ module GLM abstract type DensePred <: LinPred end # linear predictor with dense X abstract type LinPredModel <: RegressionModel end # model based on a linear predictor + @static if VERSION < v"1.8.0-DEV.1139" + pivoted_cholesky!(A; kwargs...) = cholesky!(A, Val(true); kwargs...) + else + pivoted_cholesky!(A; kwargs...) = cholesky!(A, RowMaximum(); kwargs...) + end + include("linpred.jl") include("lm.jl") include("glmtools.jl") diff --git a/src/linpred.jl b/src/linpred.jl index 412a71c9..120f1a1b 100644 --- a/src/linpred.jl +++ b/src/linpred.jl @@ -104,7 +104,7 @@ end function DensePredChol(X::StridedMatrix, pivot::Bool) F = Hermitian(float(X'X)) T = eltype(F) - F = pivot ? cholesky!(F, Val(true), tol = -one(T), check = false) : cholesky!(F) + F = pivot ? pivoted_cholesky!(F, tol = -one(T), check = false) : cholesky!(F) DensePredChol(AbstractMatrix{T}(X), zeros(T, size(X, 2)), zeros(T, size(X, 2)),