diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6758b8c..782a558 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: version: - - '1.1' + - '1.6' - '1' - nightly os: diff --git a/Project.toml b/Project.toml index a22e3eb..c6eeec7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "LsqFit" uuid = "2fda8390-95c7-5789-9bda-21331edee243" -version = "0.13.0" +version = "0.14.0" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" @@ -15,7 +15,7 @@ Distributions = "0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25" ForwardDiff = "0.10" NLSolversBase = "7.5" StatsAPI = "1" -julia = "1.1" +julia = "1.6" [extras] FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" diff --git a/src/curve_fit.jl b/src/curve_fit.jl index 1252d7d..e45fd26 100755 --- a/src/curve_fit.jl +++ b/src/curve_fit.jl @@ -299,7 +299,7 @@ function margin_error(fit::LsqFitResult, alpha=0.05; rtol::Real=NaN, atol::Real= # rtol : relative tolerance for approximate comparisson to 0.0 in negativity check std_errors = stderror(fit; rtol=rtol, atol=atol) dist = TDist(dof(fit)) - critical_values = quantile(dist, 1 - alpha / 2) + critical_values = eltype(coef(fit))(quantile(dist, Float64(1 - alpha / 2))) # scale standard errors by quantile of the student-t distribution (critical values) return std_errors * critical_values end