-
Notifications
You must be signed in to change notification settings - Fork 40
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
WIP Progress on incorporating StatsBase into statistics. #31
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,24 +165,6 @@ end | |
# | ||
############################# | ||
|
||
""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe keep these here for now. That reduces the diff, which makes things less messy, and we may want to move There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to do this but can't since this extends methods in statistics and we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. Then remove the heading above. |
||
percentile(x, p) | ||
|
||
Return the `p`th percentile of a collection `x`, i.e. `quantile(x, p / 100)`. | ||
""" | ||
percentile(x, p) = quantile(x, p * 0.01) | ||
|
||
# TODO: move to same place as other quantile methods | ||
""" | ||
quantile(x, n::Integer) | ||
|
||
Return the n-quantiles of collection `x`, i.e. the values which | ||
partition `v` into `n` subsets of nearly equal size. | ||
|
||
Equivalent to `quantile(x, [0:n]/n)`. For example, `quantile(x, 5)` | ||
returns a vector of quantiles, respectively at `[0.0, 0.2, 0.4, 0.6, 0.8, 1.0]`. | ||
""" | ||
quantile(x, n::Integer) = quantile(x, (0:n)/n) | ||
|
||
|
||
############################# | ||
|
@@ -230,7 +212,7 @@ end | |
sem(x::AbstractArray) = sqrt(var(x, corrected=true) / length(x)) | ||
|
||
# Median absolute deviation | ||
@irrational mad_constant 1.4826022185056018 BigFloat("1.482602218505601860547076529360423431326703202590312896536266275245674447622701") | ||
Base.@irrational mad_constant 1.4826022185056018 BigFloat("1.482602218505601860547076529360423431326703202590312896536266275245674447622701") | ||
|
||
""" | ||
mad(x; center=median(x), normalize=true) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to keep this to get CI to pass. We'll remove it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to delete it in order for a Revise-based workflow to work, see my discourse question here.