thanks for your note. yes, relogit in Zelig will do everything you're
interested in and so you don't need to calculate C or the var-cov matrix
yourself; all the corrections are made for you.
the key is to recognize that there are 2 separate forms of bias
correction, one for case-control studies, for which you'd use the
case.correct option, and the other for rare events bias (which is
appropriate whether or not you use case control designs), for which you'd
use the bias.correct option.
Best of luck with your research,
Gary
---
Gary King,
Institute for Quantitative Social Science
Harvard University, 1737 Cambridge St, Cambridge, MA 02138
http://GKing.Harvard.Edu, King(a)Harvard.Edu
Direct 617-495-2027, Assistant 495-9271, eFax 812-8581
On Tue, 10 Jan 2006, Dave Armstrong wrote:
> Dear Prof King,
>
> I read your paper "Logistic Regression in Rare Events Data" and have just a
> couple of quick questions about it. For consistency of notation, I've put
> them in the attached PDF. If you would have some time to look at them or
> point them and me in the right direction, it would be very much appreciated.
>
>
> Thanks for your help,
>
> Dave.
>
> --
> Dave Armstrong
> University of Maryland
> Dept of Government and Politics
> 3140 Tydings Hall
> College Park, MD 20742
> Office: 2103L Cole Field House
> Phone: 301-405-9735
> e-mail: darmstrong(a)gvpt.umd.edu
> web: www.davearmstrong-ps.com
>
> Facts are meaningless. You can use facts to prove anything that's even
> remotely true. - Homer Simpson
>
> To this day, philosophers suffer from Plato's disease: the assumption that
> reality fundamentally consists of
> abstract essences best described by words or geometry. (In truth, reality is
> largely a probabilistic affair best
> described by statistics) - Steve Sailer "The Unexpected Uselessness of
> Philosophy"
>
-
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/
Thanks for the quick response.
I tried:
z.out <- zelig(cbind(stata.data$mdivteam, stata.data$wrkrteam,
stata.data$labmgmt,
stata.data$compfirm, stata.data$purchsup,
stata.data$invfirms, stata.data$tnchs, stata.data$tnclc,
stata.data$govtints, stata.data$wagecoor, stata.data$busconf)~ NULL,
factors = 2, model = "factor.bayes", data = stata.data, na.rm=TRUE)
but produced the same error,
Error in var(x, na.rm = na.rm) : missing observations in cov/cor
Thank you,
Jose Aleman
Assistant Professor
Political Science Department
Fordham University
-
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/
when attempting to use the sample command for using multiple imputed
datasets from Professor King's website:
data(immi1, immi2, immi3, immi4, immi5)
z.out <- zelig(as.factor(ipip) ~ wage1992 + prtyid + ideol,
model = "ologit",
data = list(immi1, immi2, immi3, immi4, immi5))
I receive this error message:
Error in eval(expr, envir, enclos) : ..1 used in an incorrect context,
no ... to look in
when attempting to simulate across a range of values of one independent
variable, with code similar to this:
range.ideol<-seq(from=-0.7113, to= 8.2171, length=100)
x.out<-setx(z.out, ideol=range.ideol)
Is this an error unique to the code for multiple imputed datasets?
Thanks.
Ryan Enos
UCLA
-
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 listmembers,
I get an error message when I try the factor.bayes model even though I'm
using the latest versions of R and Zelig. When I type:
>z.out <- zelig(cbind(mdivteam, wrkrteam, labmgmt, compfirm, purchsup,
invfirms, tnchs, tnclc, govtints, wagecoor, busconf)~ NULL,
factors = 2, model = "factor.bayes", data = stata.data)
I get the following message
Error in var(x, na.rm = na.rm) : missing observations in cov/cor
I get the same error if I type:
z.out <- zelig(cbind(mdivteam, wrkrteam, labmgmt, compfirm, purchsup,
invfirms, tnchs, tnclc, govtints, wagecoor, busconf)~ NULL,
model = "factor.bayes", data = stata.data, factors = 2)
Does this mean I have to get rid of all observations that contain missing
data?
Thanks in advance,
Jose Aleman
Assistant Professor
Political Science Department
Fordham University
-
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/
Hi, Taun.
The problem is in the way you are reading in the data. Whenever you use SPSS data, you need to use:
testo <- read.spss("testo.sav", to.data.frame = TRUE)
Otherwise your data will be a list, not a data frame, and zelig() will get confused. Also, I would avoid attach() whenever possible -- you don't need it here, and so it's just another thing that will confuse R.
Best,
Olivia Lau
----- Original Message -----
From: Tuan V. Nguyen
To: 'Olivia Lau'
Sent: Wednesday, March 15, 2006 6:14 PM
Subject: RE: [zelig] Help in Zelig: "subscript out of bound"
Dear Olivia,
The data are actually in SPSS (see attached). I want to try the Zelig program, so I thought this is my ideal chance. The Zelig package I current use is the latest one (version March 9, 2006) which I have just downloaded.
My sequence of commands are as follows:
library(foreign)
testo<-read.spss("testo.sav")
attach(testo)
Library(Zelig)
zout<-zelig(ALLNEWFX~TT1+ LSBMD1,model="logit",data=testo)
summary(zout)
Thank you for having a look at this, Olivia.
Tuan
-----Original Message-----
From: Olivia Lau [mailto:olau@fas.harvard.edu]
Sent: Thursday, 16 March 2006 10:07 AM
To: Tuan V. Nguyen
Subject: Re: [zelig] Help in Zelig: "subscript out of bound"
Dear Tuan,
What version of Zelig are you using? And could you send me your data? That's a very strange error. Thanks, Olivia
----- Original Message -----
From: Tuan V. Nguyen
To: zelig(a)mail-1.hmdc.harvard.edu
Sent: Wednesday, March 15, 2006 6:07 PM
Subject: [zelig] Help in Zelig: "subscript out of bound"
Dear list members,
I am a new chap in this list. I am also a new user of Zelig. May I take this opportunity to ask a simple question.
I am trying to run a logistic regression model on my data, which -- for brevity -- has three variables: ALLNEWFX is a two-value variable (0 or 1), TT1 and LSBMD1 are continuous variables. The dataset contain 609 observations.
The model I used was:
> zout <- zelig(ALLNEWFX ~TT1+LSBMD1 ,model="logit",data=testo)
but then when I ask for a summary, I have the following message:
> summary(zout)
Error in object[[i]] : subscript out of bounds
I am not sure what does this messgae mean. Could someone please help? Thank you in advance for your help.
Regards,
Tuan
Dr Tuan V. Nguyen
Bone and Mineral Research Program
Garvan Institute of Medical Research
384 Victoria Street
Darlinghurst, NSW 2010 Australia
Phone: +612 9295 8277
Fax: +612 9295 8241
Dear list members,
I am a new chap in this list. I am also a new user of Zelig. May I
take this opportunity to ask a simple question.
I am trying to run a logistic regression model on my data, which -- for
brevity -- has three variables: ALLNEWFX is a two-value variable (0 or
1), TT1 and LSBMD1 are continuous variables. The dataset contain 609
observations.
The model I used was:
> zout <- zelig(ALLNEWFX ~TT1+LSBMD1 ,model="logit",data=testo)
but then when I ask for a summary, I have the following message:
> summary(zout)
Error in object[[i]] : subscript out of bounds
I am not sure what does this messgae mean. Could someone please help?
Thank you in advance for your help.
Regards,
Tuan
Dr Tuan V. Nguyen
Bone and Mineral Research Program
Garvan Institute of Medical Research
384 Victoria Street
Darlinghurst, NSW 2010 Australia
Phone: +612 9295 8277
Fax: +612 9295 8241