-
Notifications
You must be signed in to change notification settings - Fork 7
Description
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-dimlError 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:
- CSV file with election results data: az_example_data_for_git_issue.csv
- 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