CRAN.
Try:
install.packages("Zelig", repos = "http://gking.harvard.edu")
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012
-----------------------------------------------------
On Wed, 21 Feb 2007, Kirill Kalinin wrote:
Dear Kosuke,
Thank you for your help! I'll be downloading a new version from
www.r-project.org later today.
All the best,
Kirill
Dear Kirill,
Thanks for the bug report. We've fixed this problem and will
release a new version later today.
Many thanks,
Kosuke
---------------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics Fax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012
http://imai.princeton.edu
---------------------------------------------------------
On Feb 20, 2007, at 9:03 AM, Kirill Kalinin wrote:
> Dear Kosuke,
>
> Olivia advised me to address my problem to you, which is when I am
> trying to
> run setx() with the ordered catagorical variables (metric variables
> work
> fine) in 'logit' model I get "Error: protect(): protection stack
> overflow".
> What might be the solution to the problem?
>
> Thank you a lot for your help!
>
> Best regards,
> Kirill
>
> --------------------------------------
>
>
>> Dear Olivia,
>>
>> Thank you a lot for your prompt and detailed reply! Well, I
>> changed the
>> script as you advised to, but it doesn't seem to help to resolve the
>> issue. Same error appears when I am trying to run setx(). Are there
>> any other suggestions of what might be wrong with the script?
>>
>> Here is what I'm getting on my console now:
>>
>>> q15<- as.ordered(Q15)
>>> age<-as.ordered(AGE)
>>> ttt<-data.frame(q15=q15,age=age, putin=PUTIN_BI)
>>> z.out <- zelig(putin ~ age + q15, data = ttt, model = "logit")
>>> x.low <- setx(z.out, age = 1)
>> Error: protect(): protection stack overflow
>>> x.high <- setx(z.out, age = 4)
>> Error: protect(): protection stack overflow
>>
>> Thank you a lot for you help!
>> Best wishes,
>> Kirill
>>
>>
>
>
>
>
>
>
> Dear Kirill,
>
> I think the problem is in:
>
> ttt<-data.frame(q15,age, PUTIN_BI) # Step 1
> z.out <- zelig(PUTIN_BI ~ ttt$q15, ttt$age, na.exclude(ttt), model =
> "logit") # Step 2
>
> This should be, for the first step:
> ttt <- data.farme(q15 = q15, age = age, putin = PUTIN_BI)
> For the second step, I'm not sure what you're trying to do, but
> formulas should NEVER have $ in them! That confuses setx and sim to
> no end. And you should ALWAYS name every argument passed, since the
> order may vary. If you want to run a regression for putin on age and
> q15, then use
> z.out <- zelig(putin ~ age + q15, data = ttt, model = "logit")
> Note that I have named every argument after the default formula. You
> don't need to say na.exclude() yourself, as zelig() will do that
> automatically.
>
> If you are trying to use age as weights for observations (don't see
> why you would want to, though):
> ttt <- na.omit(ttt)
> z.out <- zelig(putin ~ q15, weights = ttt$age, data = ttt, model =
> "logit")
> You do need to do the list wise deletion yourself if you specify
> weights, and weights does need a $ in it to identify the data frame.
>
> Hope this helps, best,
> Olivia
>
>
>
>
> On 2/18/07, Kirill Kalinin <kkalinin(a)eu.spb.ru> wrote:
>> Dear Olivia,
>>
>> I am a PhD student with the European University at St. Petersburg,
>> working
>
>> on electoral behavior issues. The dataset I am running is huge -
>> 30000
>> cases. I look forward to calculating the first differences using
>> 'logit'
>> but when running setx() I get an error message: "Error: protect():
>> protection stack overflow". I was trying to decrease the size of
>> then
>> dataset, but it doesn't seem to help.
>> The script is as follows:
>>
>> library (Zelig)
>> library(foreign)
>>
>> Estdata <- read.spss(
>> "G:/geo_c.sav",
>> to.data.frame=T, use.value.labels=T)
>> dim(Estdata)
>> names(Estdata)
>> attach(Estdata)
>> q15<- as.ordered(Q15) #ordered categorical variable with 4
>> values (1-4)
>> age<-as.ordered(AGE) #ordered categorical variable with 4
>> values (1-4)
>> ttt<-data.frame(q15,age, PUTIN_BI)
>> z.out <- zelig(PUTIN_BI ~ ttt$q15, ttt$age, na.exclude(ttt), model =
>> "logit")
>>
>> Then I run:
>> x.low <- setx(z.out, q15=1)
>> x.high <- setx(z.out, q15=4)
>> So I get:
>> protect(): protection stack overflow
>>
>>
>> I wonder whether I am doing something wrong, as I am new to R and
>> Zelig,
> or
>> this happens because of my computer limitations. In fact,
>> everything is
>> perfect with metric variables, this problem occurs just with the
>> ordered
>> categorical variables. Could you help me to resolve the issue?
>>
>> Thank you very much!
>>
>> All the Best,
>> Kirill
>> P.S. Happy Chinese New Year!
>>
>>
>