Skip to content

Commit

Permalink
Update src/curve_fit.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
pkofod authored Oct 3, 2023
1 parent c446f10 commit 2c30784
Showing 1 changed file with 1 addition and 1 deletion.
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 = eltype(coef(ft))(quantile(dist, Float64(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 2c30784

Please sign in to comment.