Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update curve_fit.jl to not send big floats to beta_inc_inv #245

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(ft))(quantile(dist, Float64(1 - alpha / 2)))
pkofod marked this conversation as resolved.
Show resolved Hide resolved
# scale standard errors by quantile of the student-t distribution (critical values)
return std_errors * critical_values
end
Expand Down
Loading