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

Possible bug in ei_iter() function, failing after adjusting erho parameter #131

Open
rogers19 opened this issue Sep 21, 2021 · 0 comments
Open

Comments

@rogers19
Copy link

Running ei_iter() function and getting the following error:

G20.Marquez ~ Other iteration failed. Retrying with erho = 10 ...

G20.Marquez ~ Other iteration failed. Retrying with erho = 0.5 ...

G20.Marquez ~ Other iteration failed 3 times.
Type ?ei_iter for guidance on how to proceed.
Error on final failure:
Error in solve.default(varcv): 'a' is 0-diml

|======================================================================================== | 75%
G20.Other ~ Other iteration failed. Retrying with erho = 10 ...

G20.Other ~ Other iteration failed. Retrying with erho = 0.5 ...

G20.Other ~ Other iteration failed 3 times.
Type ?ei_iter for guidance on how to proceed.
Error on final failure:
Error in solve.default(varcv): 'a' is 0-diml

Error in { : task 2 failed - ""

I typed ?ei_iter and it guided me to submit an issue here if this problem persists.

To Reproduce
Steps and code to reproduce the behavior:

  1. CSV file with election results data: az_example_data_for_git_issue.csv
  2. R script:
library(eiCompare)

ei_data = read.csv("az_example_data_for_git_issue.csv")
cands = c("G20.Marquez", "G20.Other")
races = c("Native.Alone", "Other")
total = "Total.Votes"

# Standardize vote and race columns to sum to 1
ei_data <- stdize_votes_all(
  data = ei_data,
  cand_cols = cands,
  race_cols = races,
  totals_col = total
)

# Run 2x2 Ecological Inference
ei_2x2 <- ei_iter(
  data = ei_data,
  cand_cols = cands,
  race_cols = races,
  totals_col = total,
  name = "2x2 EI"
)

Expected behavior
I expected ei_iter() to finish running without an error. I'm not seeing any issues in the dataset that would cause that, so I'm. not sure what's going on. I've successfully run this exact code with different election results.

Environment information:

  • eiCompare version: eiCompare_3.0.0
  • Operating system: MacOS Catalina
  • R Environment: R studio, but getting the same error in R command line
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

No branches or pull requests

1 participant