To whom it may concern,
I am trying estimate the percentage of Mormons in Utah who voted republican
across time in gubernatorial, senatorial, presidential, and attorney
general elections. I have data sets for nearly every election dating back
to 1960. These data sets report the proportion of Mormons out of the total
population at the county level for every county in Utah. The data sets also
report the proportion of voters who voted republican at the same county
level and the total number of voters in each county. For the majority of
the data sets, the "ei" program has worked fine. However, for two of the
data sets, the "ei" program reports an error message that I haven't figured
out. The error message appears after the "dbuf<-ei()" command. Here is the
exact text (the first three lines appear just before the error message):
[1] "Running 2x2 ei"
Maximizing likelihood
Importance Sampling..
Error in if (any(lower > upper)) stop("lower>upper integration limits") :
missing value where TRUE/FALSE needed
To further clarify my problem, I've attached a data set for which "ei"
worked fine--"2000Attgen.csv"--and a data set for which "ei" reported the
above error message--"2004Attgen.csv". You can upload these files into R
and then run the commands in the attached "Commands.R" script file. The
"Printout from commands.R" script file presents the printout I see when I
run the same commands I've attached.
My questions are: What exactly is the error message telling me? And how do
I fix the error?
Thank you in advance for your assistance. Please feel free to respond to
this e-mail address if you have further questions.
Regards,
Brian Reed
Research Fellow
Center for the Study of Elections and Democracy (CSED)
Brigham Young University