I am trying to install eiR on Windows 10 and am using the built-in
Administrator account to avoid permissions issues.
I have installed R fine and was able to install the prerequisite packages
from a CRAN mirror fine as well ("msm", "tmvtnorm", "ellipse", "plotrix",
"ucminf", "cubature", "mnormt", "foreach", "sp", "rgl", "lattice")
However when I run the command:
install.packages("ei", type="source", repos="http://r.iq.harvard.edu")
I get the following error:
Warning: unable to access index for repository
http://r.iq.harvard.edu/src/contrib
Warning message:
package ‘ei’ is not available (for R version 2.15.1)
If I point a web browser at the address it looks like an empty directory
So I downloaded the ei package (ei_1.1.tar_.gz) to a local file, but can't
seem to get the syntax right to load it.
I've tried all kinds of combinations and get errors on all of them. For
example:
> install.packages("C:/packages/ei_1.1.tar_.gz", repos = NULL,
type="source")
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string:
'\037‹\b\0Oô/O\0\003ìZ\vt\033Õ™\016íYˆµ-\033\036¥=§4ÜÈ\n²\035[OËŽã\a‘-9\026ز‘ä<°
2Ò\\I“ŒfÄÌÈŽ\023£)ïmYΆ¥P8[\b,»Ð„7Ka³t)P^á\025–m\022ž\033\bKÛP\036'
Warning messages:
1: running command 'C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD INSTALL -l
"C:/Program Files/R/R-2.15.1/library" "C:/packages/ei_1.1.tar_.gz"' had
status 1
2: In install.packages("C:/packages/ei_1.1.tar_.gz", repos = NULL, :
installation of package ‘C:/packages/ei_1.1.tar_.gz’ had non-zero exit
status
and:
> install.packages("file:///c:/packages/ei_1.1.tar_.gz", type="source",
repos=NULL)
Warning: invalid package 'file:///c:/packages/ei_1.1.tar_.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command 'C:/PROGRA~1/R/R-215~1.1/bin/x64/R CMD INSTALL -l
"C:/Program Files/R/R-2.15.1/library"
"file:///c:/packages/ei_1.1.tar_.gz"' had status 1
2: In install.packages("file:///c:/packages/ei_1.1.tar_.gz", type =
"source", :
installation of package ‘file:///c:/packages/ei_1.1.tar_.gz’ had non-zero
exit status
I've installed it many times before from the http://r.iq.harvard.edu
repository with no problems, even on other Windows 10 computers. Please
help, thanks!
___________________________________________________________________
*Chris Low*
*Empowering faculty to use technology effectively for teaching and
research.*
Team Lead, Technology Liaisons
Faculty Technology Support, Religion & Social Science Divisions
Pepperdine University
(310) 506-6512
[image: Courses Upgrade Email Signature Image]
http://bitly.com/coursesupgrade
Using a small sample data set displayed at the bottom, I get the following error:
> dbuf <- ei(cbind(Choice.1, Choice.2, Choice.3, Choice.4) ~ cbind (Hi.Ed, Lo.Ed), total = "Pop", data = Big10, erho = 1)
[1] "Running eiRxC"
Warning messages:
1: In BayesMDei(formula, data, total = total, lambda1 = lambda1, lambda2 = lambda2, :
column marginals are proportions - multiplying by unit size
2: In BayesMDei(formula, data, total = total, lambda1 = lambda1, lambda2 = lambda2, :
row margnials are proportions - multiplying by unit size
> summary(dbuf)
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
Choice.1 through Lo.Ed are of type “double.” Pop is “integer.” Any clue what the problem is?
Thanks in advance,
Bill
Choice.1
Choice.2
Choice.3
Choice.4
Hi.Ed
Lo.Ed
Pop
1
0.3960557
0.12370783
0.03217493
0.4480615
0.8442948
0.1557052
6222266
2
0.3356513
0.21803941
0.04251478
0.4037946
0.7541880
0.2458120
2191191
3
0.3035858
0.25241441
0.04002214
0.4039776
0.7643341
0.2356659
2009188
4
0.2598502
0.23172176
0.03091056
0.4775175
0.7086558
0.2913442
1438117
5
0.2604717
0.20728731
0.03202850
0.5002125
0.6786428
0.3213572
1308522
6
0.4288244
0.12137359
0.03955583
0.4102462
0.7334543
0.2665457
1193225
7
0.4811792
0.08965016
0.04065763
0.3885130
0.8305589
0.1694411
1069959
8
0.3296191
0.19188244
0.04399802
0.4345004
0.7813900
0.2186100
989090
9
0.4292554
0.15589339
0.04158555
0.3732657
0.8167544
0.1832456
743816
10
0.5334055
0.05825534
0.03558262
0.3727566
0.7925295
0.2074705
646945
Sent from Mail for Windows 10
Hi R users,
I need your help to install the "cem" package. I tried severla time to
install the package but I get the followinf error message:
> install.packages("cem",repos="http://r.iq.harvard.edu", type="source")
Installing package into ‘/Users/gucho/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://r.iq.harvard.edu/src/contrib/cem_1.1.14.tar.gz'
Content type 'application/x-gzip' length 2000723 bytes (1.9 MB)
opened URL
==================================================
downloaded 1.9 MB
* installing *source* package ‘cem’ ...
** R
** data
** inst
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so,
10): Library not loaded: /usr/X11/lib/libXft.2.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: image not found
Error : package ‘tcltk’ could not be loaded
ERROR: lazy loading failed for package ‘cem’
* removing ‘/Users/gucho/Library/R/3.1/library/cem’
Warning in install.packages :
installation of package ‘cem’ had non-zero exit status
I have a iMac with OS Yosemite. Thanks for your help.
The examples online seem to illustrate how to obtain parameters for a particular district when using a multinomial-Dirichlet R x C model of EI for R. Most likely I somehow missed the information in the documentation, but how would one obtain the, say, betaB averaged across all districts at once, not just for district 1 or district 2, etc.
Many thanks,
Joel Fetzer
Pepperdine University
Hello,
I am running a lot of models and want a way to dump the EI results (I am interested in ) into a pretty table. This automation would free up a significant portion of my time. I have looked high and low for such a package or how-to and have found nothing.
Any suggestions?
megan
Megan A. Gall, MSGIS, PhD
Social Science Analyst, Voting Rights Project
Lawyers' Committee for Civil Rights Under Law
1401 New York Avenue, NW Suite 400
Washington, DC 20005
Office: 202-662-8322
General Fax: 202-783-0857
www.lawyerscommittee.org
[LClogo_661_cmyk]
Hello,
I am using EI to estimate crossover voting in the Top 2 Primary in California in 2012. The unit of analysis is at the precinct level and I match the turnout record of partisan voters with election return data. For simulation, I use the following formula.
formula <- cbind(dem.return, rep.return, oth.return) ~ cbind(dem.show, rep.show, oth.show)
dem.return : Vote Share of a Democratic Candidates at the precinct level
rep.return : Vote Share of a Republican Candidates
oth.return : Vote Share of a Non-Two Party Candidate
dem.show : Ratio of Democratic Registered Voters among who casted ballot for the primary
rep.show : Ratio of Republic Registered Voters among who casted ballot for the primary
oth.show : Ratio of Non-two Party Voters among who casted ballot for the primary
My quantity of interests are the ratio of democratic registered voters who voted for the republican candidates (Democratic Crossover to Republican Party) and the ratio of republican registered voters who voted for the democratic candidates (Republican Crossover to Democratic Party).
Using precinct level data, I am trying to estimate population weighted average of crossover voting at the State Assembly District. In some districts, the estimate looks reasonable. However, in other districts, my estimates suggest that more than half of each partisan voters crossover to other parties. I wonder what would be the best way to examine how reasonable my EI estimates are.
Thank you for your help.
Best,
Woo Chang KANG
--
Woo Chang KANG
Ph.D. Candidate
Department of Politics
New York University
19 West 4th St. 2nd Fl.,
New York, NY 10012.
Hello again. I have a question regarding EzI software. I have a dataset with electoral data desaggregated up to county level. I have run the model with presidential vote in one year as "t" and legislative vote in a previous year as "x".
Since the dataset contains data up to county level, I want to export the estimates results in order to make a georeferentiation.
When I export those estimates there is not an indicator (ID), so I can´t know to which county correspond each estimate. Is the order in which those estimates are exported the same as in the original database? If not, how can I know which estimate correspond to which county?
Sorry for troubling you again.
Thank you very much,
Bests regards,
Germán Rosati
PS: I´m sorry for my (not very elegant) english
Is there anyone on this list, preferably in the LA area, that would be
interested in providing some consulting / training on EI in Jan or Feb?
I'm looking to get up to speed quickly on the mechanics of using the
software (I've read the books & articles and understand the ideas, now just
need to learn the technical details of running the program).
Thanks!
- Doug
Douglas Johnson, Fellow
Rose Institute of State and Local Government
at Claremont McKenna College
douglas.johnson(a)cmc.edu
310-200-2058
I'm trying to use ei within R, but I've been unable to extract the ei files
from the tar package. I get an "error/warning" message. I've enlisted my
computer help desk; the same thing happens when they try to extract the
files. Any suggestions?
Barry