Dear Steve:
Zelig & R compatibility is described in the Zelig release notes:
http://gking.harvard.edu/zelig/docs/What_s_New__Zelig.html
Installation usually works even if you have the wrong version
number, but library(Zelig) will tell you that you need an
updated version of R. Older versions of Zelig (usually not
patched) are available for manual installation using the
terminal window in Linux or at the drop down menus in RAqua or
Windows R.
We usually require the latest version of R because we implement
changes in Zelig to make it run on that version.
If you think that install.packages() should give an error when a
certain version of R is required (e.g., R (>= 1.9)), then you
should email the r-help list.
Yours,
Olivia Lau
----- Original Message -----
From: "Steve Purpura" <stevepurpura(a)yahoo.com>
To: "'Olivia Lau'" <olau(a)fas.harvard.edu>
Sent: Sunday, May 30, 2004 11:59 PM
Subject: Another common error
> Is that students try to run Zelig under the wrong version of
{R}. If you
> could check the {R} version number and return a "fail to load"
on low
> version, that would be useful too.
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Dear Steve:
Categorical variables are only recognized as such if they are
first classified as factors. So if you're just reading in data
from .dta or .tab or whathever, all fields containing numbers
(even binary fields, or categorical fields) are by default
numeric; fields that contain character strings are coerced to
character. You have to change the class of the numeric or
character variable to a factor varaible for setx() to recognize
it as a categorical response:
data$x <- as.factor(data$x) # or use factor()
Factors are described in:
http://gking.harvard.edu/zelig/docs/Types_of_Data.html
See item #2 on this page ("A factor vector allows...")
Yours,
Olivia Lau
----- Original Message -----
From: "Steve Purpura" <stevepurpura(a)yahoo.com>
To: "'Olivia Lau'" <olau(a)fas.harvard.edu>
Sent: Sunday, May 30, 2004 11:57 PM
Subject: RE: Setx()
> Sorry for the confusion, Olivia. By miss-typing, I mean
setting a
> categorical variable to a continuous variable.
>
>
> Steve
>
> -----Original Message-----
> From: Olivia Lau [mailto:olau@fas.harvard.edu]
> Sent: Sunday, May 30, 2004 8:49 PM
> To: Steve Purpura
> Subject: Re: Setx()
>
> Dear Steve:
>
> Mis-typing a variable name usually gives an error message to
the effect that
> "[variable] cannot be found". I actually find this error
message pretty
> informative: It tells you that the [variable] is not in the
workspace or in
> the dataframe, which means that you've made a mistake. You
just have to be
> careful and pay attention to your data (which are good things
to do in any
> case). There's no built-in R spell-checker, unfortunately.
>
> I found a design flaw (not a bug, much bigger) in setx() last
week and we're
> working on it. There will be a revised function and a new set
of examples
> in the next few days, so keep an eye out for it.
>
> Yours,
>
> Olivia Lau
>
>
> ----- Original Message -----
> From: "Steve Purpura" <stevepurpura(a)yahoo.com>
> To: "'Olivia Lau'" <olau(a)fas.harvard.edu>
> Sent: Sunday, May 30, 2004 11:18 PM
> Subject: Setx()
>
>
> > As preparation for my teaching aids, students ask me
questions
> about how to
> > get Zelig to work for their models. The number one problem
> they experience
> > is in dealing with the error messages from setx().
> >
> > Typically, they are miss-typing a variable and setx() is
> making a different
> > assumption than they desire. The error messages that are
> returned to the
> > student don't make any sense to them.
> >
> > Do you have any advice on the process a researcher should go
> through before
> > calling setx() to validate that their data will be processed
> as they believe
> > it should? Alternatively, do you have any interesting
insight
> into how to
> > uncover the root cause of problems from setx() error
messages?
> >
> > Thanks,
> >
> >
> > Steve Purpura
> >
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
I am interested in running a model in Zelig that is similar to running
the HECKPROB command in Stata 8. My question pertains to the nature of
the selection process for the bprobit (and blogit) models in Zelig.
When running HECKPROB in Stata, the second stage estimates sample from
only those cases that actually make it into the second stage (i.e.,
have a value of 1 for the first stage dependent variable). Then one can
generate predictions and summary information using the Predict pcond
command (in Stata). My question is how can I run this type of model in
Zelig? The models I have run in Zelig to this point seem to be drawing
from the entire sample in estimating independent variable effects for
both the first and second stage dependent variables. My question is,
essentially, how can I run a model in Zelig that is equivalent to
Heckprob in Stata 8?
Thanks,
Eric
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Dear all,
I'm trying to use Zelig to automatically calculate predicted
probabilities for all individual observation pixels (=10.027), but get
an error message after the sim() statement..
I have 17 significant variables in the model.
Does anybody know what could be wrong?
-------------------------------------------------------------------------------
>z.out1<-zelig(depressies~archeodist + aspect2 + aspect3 + B_1 + B_2 +
B_3 + B_4 + B_5 + B_6 + B_7 + G_fb + G_zbr + G_zle + gully + roadgully
+ helling + wegen, data = data1 , model = "relogit" , tau = 2338/556823
, bias.correct = TRUE)
> x.out1<-setx(z.out1,data=data1,cond=TRUE)
> s.out1<-sim(z.out1,x=x.out1)
Error in coef %*% t(x) : non-conformable arguments
>
Any help would be appreciated,
Thanks,
Tom
--
Tom Vanwalleghem
Laboratory for experimental geomorphology
Redingenstraat 16
B-3000 LEUVEN
+32(0)16/326414
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
I've run into a problem running analysis on a rather large (nearly
500,000 cases) data set. When I attempt to run the analysis, I get the
following error message:
> library(foreign)
> wd<-"C:/Documents and Settings/PSGSA/My Documents/Eric/maoz"
> setwd(wd)
> maoz<-read.dta("maoz.dta")
> z.out<-zelig(mzcowwar ~ territor + cc24 + cc24xt, model = "logit",
data = maoz)
Error: cannot allocate vector of size 3900 Kb
>
I've already increased the memory and vector allowance (as outlined in
the F.A.Q. and message board) using the --max-vsize command but still
have had no luck. I'm wondering if this is due to the memory of my
machine or to R. I was able to run the same procedure with the same
variables and data set in Stata so I'm guessing it's not completely my
computer but rather that I'm doing something wrong in Zelig. If anyone
could give me a suggestion, it would be greatly appreciated.
Sincerely,
Eric
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
To Whom It May Concern:
I've run into a problem loading data into Zelig and unfortunately, have
been unable to resolve the problem on my own or with the aid of the
help option. Any assistance would be greatly appreciated.
The problem may be a result of my ignorance of the proper working
directory. I have been using the same directory that the sample data
(ie turnout, mid, etc.) is contained within (library\Zelig\data).
While i have been able to load the sample data with the data() command,
I have not had any luck at loading my data using the instructions for
tab, space or comma delimited data.
The problem may also arise from an incorrect data format. The data was
originally a Stata file. Using Stat Transfer, I transfered the file
into ASCII delimited. Perhaps this is incorrect. I have tried using
the instructions for loading Stata .dta files directly into Zelig but
have also run into problems. Again, with that stata file in the
Zelig\data directory I typed the command:
> library(foreign)
> stata.data <- read.dta("states.dta")
and recieved the following error message:
>Error in read.dta("states.dta") : unable to open file
I have taken missing data and string variables into account so I don't
think that this is the problem.
The Error Message I keep receiving is
>Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file `states.csv'
Again, I've been using the commands:
>read.csv("states.csv") and/or read.csv("statesb.csv", header = TRUE,
na.strings = " ") for comma delimited data
and
>read.table("states.txt")
but keep getting the (file, "r") error message.
Any advice as to what might be the problem would be greatly
appreciated. If you need more information as to how I've been trying
to open my data, please let me know. Thanks in advance.
Sincerely,
Eric M. Wilk
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/