Have folks found a command in Zelig that lets one check standard errors on coefficient
terms so we know whether coefficients are significant?
Thanks.
Tom
Thomas Sander
Executive Director
Saguaro Seminar: Civic Engagement in America
Harvard Kennedy School, Harvard University
79 JFK Street, Taubman 364, Cambridge, MA 02138
T - 617.496.2764 F - 617.495.1589
tom_sander at
harvard.edu
www.hks.harvard.edu/saguaro
social capital blog:
http://socialcapital.wordpress.com
-----Original Message-----
From: gov2001-l-bounces at
lists.fas.harvard.edu [mailto:gov2001-l-bounces at
lists.fas.harvard.edu] On Behalf Of gov2001-l-request at
lists.fas.harvard.edu
Sent: Tuesday, March 10, 2009 1:56 PM
To: gov2001-l at
lists.fas.harvard.edu
Subject: gov2001-l Digest, Vol 46, Issue 19
Send gov2001-l mailing list submissions to
gov2001-l at
lists.fas.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
or, via email, send a message with subject or body 'help' to
gov2001-l-request at
lists.fas.harvard.edu
You can reach the person managing the list at
gov2001-l-owner at
lists.fas.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of gov2001-l digest..."
Today's Topics:
1. Re: zelig() (Olena Ageyeva)
2. Re: zelig() (Olena Ageyeva)
3. permanently loading a package (Allen, Abigail)
----------------------------------------------------------------------
Message: 1
Date: Tue, 10 Mar 2009 12:56:36 -0400
From: Olena Ageyeva <eageeva at hotmail.com>
Subject: Re: [gov2001-l] zelig()
To: <gov2001-l at lists.fas.harvard.edu>
Message-ID: <COL104-W226BD4DF536DA07148B326BBA10 at phx.gbl>
Content-Type: text/plain; charset="windows-1252"
Thanks, Brandon.
I have tried to make changes in my code as you suggested, but I still can't make it
work.
Here is my code:
load("shuttle.RData")
temperature<-as.numeric(data[,3])#separating variables
pressure<-as.numeric(data[,4])
incident<-as.numeric(data[,2])
data<-as.data.frame(cbind(incident,temperature, pressure))#making a data frame
z.out<-zelig(incident~temperature+pressure,model="logit", data= data)
Running this code I get just the following message and no results:
How to cite this model in Zelig:
Kosuke Imai, Gary King, and Oliva Lau. 2008. "logit: Logistic Regression for
Dichotomous Dependent Variables" in Kosuke Imai, Gary King, and Olivia Lau,
"Zelig: Everyone's Statistical Software,"
http://gking.harvard.edu/zelig
I did read the documentation about using zelig(), but it's still not clear to me how
to use it.
Sincerely,
Olena Ageyeva
Date: Tue, 10 Mar 2009 07:39:15 -0500
From: bstewart at
fas.harvard.edu
To: gov2001-l at
lists.fas.harvard.edu
Subject: Re: [gov2001-l] zelig()
Olena,
data.frame is an object class in R (all objects have classes in R) that is similar to a
matrix but more flexible. Your class is "numeric" after you have done
as.numeric. To get a dataframe, you need to combine all the different elements into one
dataset. See the following code as an example:
shuttle <- load("shuttle.RData")datatbc <- as.numeric(data) ##Data to be
convertedIncident <- datatbc[24:46] ##Make VariablesTemperature <- datatbc[47:69]
Pressure <- datatbc[70:92]data <- as.data.frame(cbind(Incident, Temperature,
Pressure)) ##Combine to make data framecheck <- zelig(Incident ~ Temperature +
Pressure, model="logit", data=data)
I converted the data, into a numeric vector (the object datatbc) and then sliced that
object into variables (the next three lines). Then by combining the three variables with
cbind() we create a matrix, that gets converted with "as.data.frame"
Finally, on the last line, I've added the relevant zelig code. I could have labeled
that variables data$Incident, data$Temperature etc. Specifying the "data" field
in Zelig (or most any other model in R) simply allows you to refer to objects with their
variable name inside the data frame rather than the dataframe, a dollar sign, the variable
name.
Brandon
On Tue, Mar 10, 2009 at 5:40 AM, Olena Ageyeva <eageeva at hotmail.com> wrote:
Have anyone tied it yet? What should be set as "data" parameter?
I keep getting an error message and have no idea how to fix it.
load("shuttle.RData")
dta<-data
z.out<-zelig(as.numeric(incident)~as.numeric(temperature)+as.numeric(pressure),model="logit",
data= dta)
Error in model.frame.default(formula = as.numeric(incident) ~
as.numeric(temperature) + :
'data' must be a data.frame, not a matrix or an array
Sincerely,
Olena Ageyeva
Windows Live?: Keep your life in sync. Check it out.
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
_________________________________________________________________
Access your email online and on the go with Windows Live Hotmail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Access_022009