Rachel,
Try this: use setx() to set some non-factor variable. Then look at the setx
object. How is it storing the factor variable? It might be storing it as a
series of dummy variables or as a single variable. However it's storing it
is how you want to feed it the information (if that makes sense).
Brandon
On Thu, Apr 14, 2011 at 2:18 PM, Rachel Crouch <rcrouch(a)jd12.law.harvard.edu
wrote:
Hi class,
I’m having some trouble interpreting mlogit and ologit models I am working
on for the replication paper. I am able to get the models to run, but then
when I try to figure out the first differences, I get an error:
x.noflood <- setx(z.out.mnl.1, FLOOD.2d.v1 = 0)
Error in "contrasts<-"(`*tmp*`, value = "contr.treatment") :
contrasts can be applied only to factors with 2 or more levels
This is odd, because the factor does have more than 2 levels.
I think this has been a problem for others in zelig in the past, but none
of the dialogue I have found online about it helps. Setting the dependent
variable to a factor before entering it into the model, as suggested by some
people on help forums doesn’t help. Have any of you run across this issue
before?
Thanks!
Rachel
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l