I have R 2.5.0 on a Windows XP machine with Zelig 2.8-2
All the required CRAN packages are in and zelig loads according to the
command in the Rprofile.site file.
when I ask for help I get:
Loading required package: MASS
Loading required package: boot
##
## Zelig (Version 2.8-2, built: 2007-03-03)
## Please refer to http://gking.harvard.edu/zelig for full documentation
## or help.zelig() for help with commands and models supported by Zelig.
##
> help.zelig()
Error: 'file_test' is not an exported object from 'namespace:tools'
>
Any ideas as to where I've gone wrong?
Andrew Roberts
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
---------- Forwarded message ----------
From: Brandon Van Dyck <brandonvandyck(a)gmail.com>
Date: Apr 20, 2007 11:03 PM
Subject: bug in mlogit?
To: olau(a)fas.harvard.edu
Hi. I'm using the latest version of Zelig and VGAM and encountered a
strange error with the mlogit model and interaction terms:
library(Zelig)
# Read in the data
data <- read.csv("ferdi.csv")
z.out2 <- zelig(as.factor(outcome.2) ~ bureau + democracy+
I(democracy^2) + army.1000 +
duration + I(duration^2) + exports + gini + border + ethnicity + wartype
+ UN + forest + mountain + africa + lnpop + logincome, model="mlogit",
data = data)
# the error i get is:
Error in devmu[small] = sy * log(smu) : NAs are not allowed in
subscripted assignments
Can anyone help me out? The data is attached.
Many thanks,
Brandon
Hello I am having a problem with setx() with binomial model i.e.
y ~ Binomial(p, k)
where k is number of possible successes. I am providing an reproducible
example bellow.
<code r>
## --- Generate data ---
## Number of possible successes
k <- 25
## Probabilities
p <- c(0.2, 0.7)
## Number of records
n <- 200
y <- rbinom(n=n, size=k, prob=p)
y <- cbind(y, k - y)
fac <- as.factor(rep(1:length(p), times=(n / length(p))))
myData <- data.frame(y=y, fac=fac)
## --- Model ---
z.out <- zelig(y ~ fac, model="logit", data=myData)
summary(z.out)
tmp <- glm(y ~ fac, data=myData, family=binomial)
summary(tmp)
## --> OK
## --- Inferences ---
x.out <- setx(z.out, fn=NULL)
s.out <- sim(z.out, x=x.out)
summary(s.out)
## --> OK
x0 <- setx(z.out, fac="1")
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, :
variable lengths differ (found for 'fac')
In addition: Warning message:
There is more than one mode. The first level is selected. in: FUN(X[[1]], ...)
x1 <- setx(z.out, fac="2")
fac1 <- sim(z.out, x=x0)
fac2 <- sim(z.out, x=x1)
facDiff <- sim(z.out, x=x0, x1=x1)
</code r>
Is it possible to overcome this problem?
Thank you, Gregor
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Hi all,
I have a set of choice tasks (unordered) with responses taking on two value (yes or no). Is mlogit.bayes suitable for this, given that each person makes multiple choices.
Is there another zelig package more suitable for this?
Thanks Paul
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Hi Andres,
Can you please send us some more info ? Preferably and replicable example?
Your code below is similar to Zelig's ei.RxC demos (which seems to work
correctly).
The only difference is the dataset used.
Thanks,
Ferdi
>I am trying to use the Zelig statistical software to run the ecological
>inference (EI) application for RxC tables.
>The only problem that I have is that I can't figure out a way to make
>predictions for each precinct.
>In particular, this is the code that I am using:
>
>eidata<-read.table("y.txt")
>z.out<-zelig(cbind(V13,V14,V15)~V7 + V8 + V9, covar=NULL,
>model="ei.RxC",data=eidata)
>x.out<-setx(z.out, fn=NULL, data=eidata, cond=TRUE)
>s.out<-sim(z.out,x=x.out)
>
>After running this code, all the elements in s.out$qi$ev are equal to NA.
>
>Thanks so much,
>
>Andres Musalem.
>
>- --
>Andres Musalem
>Assistant Professor of Marketing
>Duke University's Fuqua School of Business
>http://www.fuqua.duke.edu/faculty/alpha/musalem.htm
>
>
>
>
>
>E-mail message checked by PC Tools Spyware Doctor (5.0.0.176)
>Database version: 5.07020
>http://www.pctools.com/spyware-doctor/
>
>------------------------------
>
>End of zelig_at_lists_gking_harvard_edu V1 #40
>**********************************************
>
>
>-
>Zelig Mailing List, served by Harvard-MIT Data Center
>Send messages: zelig(a)lists.gking.harvard.edu
>[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
>Zelig program information: http://gking.harvard.edu/zelig/
>
>
--
Ferdinand Alimadhi
Manager of Statistical Programming
Harvard University
The Institute for Quantitative Social Science
(617) 496-0187
falimadhi(a)iq.harvard.edu
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
I am trying to use the Zelig statistical software to run the ecological
inference (EI) application for RxC tables.
The only problem that I have is that I can't figure out a way to make
predictions for each precinct.
In particular, this is the code that I am using:
eidata<-read.table("y.txt")
z.out<-zelig(cbind(V13,V14,V15)~V7 + V8 + V9, covar=NULL,
model="ei.RxC",data=eidata)
x.out<-setx(z.out, fn=NULL, data=eidata, cond=TRUE)
s.out<-sim(z.out,x=x.out)
After running this code, all the elements in s.out$qi$ev are equal to NA.
Thanks so much,
Andres Musalem.
--
Andres Musalem
Assistant Professor of Marketing
Duke University's Fuqua School of Business
http://www.fuqua.duke.edu/faculty/alpha/musalem.htm
E-mail message checked by PC Tools Spyware Doctor (5.0.0.176)
Database version: 5.07020
http://www.pctools.com/spyware-doctor/
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Hi all:
I've been trying to install Zelig on a new computer I just got which,
unfortunately, is running Windows Vista. Is anyone aware of any
compatibility issues with that OS? I am getting a strange error when I
try to install Zelig:
Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program
Files/R/R-2.4.1/library/file1eb26e9/Zelig/chtml/Zelig.chm'
I get a similar error when I download the .zip file into a local directory
and try to install from within R.
Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program
Files/R/R-2.4.1/library/file1bd94efe/Zelig/help/MatchIt.url'
Any ideas or suggestions?
Lanhee
-----------------------------------------------------------------
Lanhee J. Chen 1737 Cambridge St., CGIS
Ph.D. Candidate, Government Dept. Cambridge, MA 02138
J.D. Candidate, Law School (617) 216-5588
Harvard University lchen(a)fas.harvard.edu
-----------------------------------------------------------------
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: http://lists.gking.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/