Skip to content

Conversation

tjmahr
Copy link
Collaborator

@tjmahr tjmahr commented May 22, 2019

The rank-normalization paper says:

Rank normalization proceeds as follows. First, replace each value θ^(nm) by its rank r^(nm) within the pooled draws from all chains. Average rank for ties are used to conserve the number of unique values of discrete quantities.

I was breaking ties by using dplyr::row_number() which works like rank(.., ties.method = "first"). This update changes the method to use averages.

It also fixes a warning from the unit tests.

tjmahr added 2 commits May 22, 2019 09:43
- ranks should break ties by averaging, according to manuscript
- reserve "rank-normalized" for when ranks are normalized (converted to a z or similar scale)
@tjmahr tjmahr requested a review from jgabry May 22, 2019 14:53
@codecov-io
Copy link

codecov-io commented May 22, 2019

Codecov Report

Merging #199 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   99.35%   99.35%   +<.01%     
==========================================
  Files          30       30              
  Lines        4204     4206       +2     
==========================================
+ Hits         4177     4179       +2     
  Misses         27       27
Impacted Files Coverage Δ
R/mcmc-traces.R 100% <100%> (ø) ⬆️
R/mcmc-intervals.R 99.24% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6dacc42...1499635. Read the comment docs.

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jgabry jgabry merged commit bf1dec2 into master May 22, 2019
@jgabry jgabry deleted the rank-hotfix branch May 22, 2019 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants