Skip to content

Commit

Permalink
Merge branch 'master' into aa/statsapi
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored Oct 4, 2023
2 parents 179315e + 62f3e5f commit b174693
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.1'
- '1.6'
- '1'
- nightly
os:
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/curve_fit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b174693

Please sign in to comment.