Try as.factor(schid) (or whatever "attention" is) within your Zelig
function.
On 3/22/07, Matt Chingos <chingos at fas.harvard.edu> wrote:
That doesn't seem to be the problem. The code I'm using is:
table4.col5 <- zelig(actorsat ~ small + aide + fem + lunch + schid,
data=data[is.na(data$samp4.2)==F,], model="logit")
x.out<- setx(table4.col5, small=0)
Then get error message, look in x.out, and it has all of the variable
names but none of the mean/mode values. The factor variable is schid.
Jill Goldenziel wrote:
I can't remember if that is the error
message I was getting, and I don't
know what your code is, but Zelig did not like it when I called my
variables using $$ (as in final.data$attention) in any of the zelig
functions. I had to rename my variables (attention <-
final.data$attention) and then suddenly everything worked perfectly.
Hope that helps,
Jill
On 3/22/07, *Matt Chingos* < chingos at
fas.harvard.edu
<mailto:chingos at fas.harvard.edu>> wrote:
I'm having a problem with the setx() command in Zelig when my
regression
includes a factor variable with more than one mode. I get the
following
error message:
Warning message:
There is more than one mode. The first level is selected. in:
FUN(X[[1]], ...)
which is fine, but the problem is that Zelig doesn't pick the first
level, it just returns a vector with nothing in it (for any of the
variables, not just the factor).
Any ideas?
Matt
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu <mailto:
gov2001-l at
lists.fas.harvard.edu>
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
------------------------------------------------------------------------
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l