RPVote / eiCompare

Comparing ecological inference techniques
https://rpvote.github.io/voting-rights/
6 stars 6 forks source link

precinct_agg_combine() questions #74

Closed lorenc5 closed 4 years ago

lorenc5 commented 4 years ago

This function, especially, needs working documentation in the help file.

In race_cols; race_keys argument help file, take out the word list, and replace with vector since that's what the passage is from what I can tell. We want this, right?:

race_cols = c("pred.whi", "pred.bla", "pred.his","pred.asi", "pred.oth")

not this: race_cols = list("pred.whi", "pred.bla", "pred.his","pred.asi", "pred.oth")

Also, I executed the function fine for predicted race, but ground truth was not working. I think it's due to the mapping. So some documentation and/or examples in the help file will help. Can we collapse predicted and ground truth at the same time? That should be the goal and I think probably is what your code but it's not clear to me in my attempted walk through.

lorenc5 commented 4 years ago

Ok, I see now this is the right way: race_keys = list("Asian" = "Asian", "Black" = "Black", "Hispanic" = "Hispanic", "Other" = "Other", "White" = "White").

Make this more clear in the documentation.

pssachdeva commented 4 years ago

Right now it doesn't do both at the same time, but this can be implemented.

I can add an example in the documentation.

lorenc5 commented 4 years ago

The best would be to have the defaults set to not doing both, most of the time the data will have estimated race but not true race. But an option for breaking out both in one call would be great. Then, in documentation, have a baseline default example, then another where you collapse both simultaneously. That would be sick!

On Thu, Aug 13, 2020 at 11:04 AM Pratik Sachdeva notifications@github.com wrote:

Right now it doesn't do both at the same time, but this can be implemented.

I can add an example in the documentation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RPVote/eiCompare/issues/74#issuecomment-673596177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKPEZT5SOPIHDNZP3ETMZTSAQMLRANCNFSM4P6S7CWA .

-- Loren Collingwood Associate Professor Department of Political Science University of California, Riverside collingwoodresearch.com