Dear Kosuke
Imai,
Thank you for
the quick confirmation of the message's receipt. Following your indication, I'm
addressing my question to all Zelig users with my thanks in advance for
helping me solve out the problem.
I have a special interest in the
"logit mixed" model and the issue related to which I would be grateful you could
give some feedback is the following: most of the variables in my data set are
categorical variables. The problem I have is that when I'm trying to calculate
interaction effects with the "sim" function and two categorical variables are
involved, I usually cannot do it. Moreover, if it works, it is only for some
levels of the categorical variables, not all of them.
The message I
get in my R prompt is as follows:
-------
Error in object@nlmodel$family$linkinv(eta) :
Argument eta must be a nonempty numeric
vector
------------
And I do not know how to interpret
it.
What I usually do is:
- Order the categorical
variables, for
example.
age<-as.ordered(AGE)
education<-as.orderd(EDUCATION)
gender<-as.orderd(GENDER)
...
The dependent variable (Internet at home for example-Ihome) is
categorical, with two levels (Yes/no)
After estimating the
model:
Res<-zelig(Ihome~age+education+gender+...+gender*education+gender*skills+...+tag(1|region),
data=dat,model="logit.mixed",na.action=na.exclude)
Summary(Res)
Apart
from obtaining a global interaction effect between "gender and education" for
example (both of them individual level variables), I would like to calculate
the interactions for all the levels of these variables: gender (male, female,
ordered as: male<female); education (low secondary,
high secondary,
university; ordered as: low secondary<high
secondary<university) and I
do the following:
x.ge<-setx(Res, gender="male",
education="low
sec")
s.ge<-sim(Res,x=x.ge)
Or
x.ge1<-setx(Res,
gender="male",
education="high
sec")
s.ge1<-sim(Res,x=x.ge1)
...
But I always get the
error message:
Error in object@nlmodel$family$linkinv(eta) :
Argument eta must be a nonempty numeric
vector
I have to say that when a numerical and a categorical variable are
involved it works.
Many thanks in advance for your
help.
Sincerely yours,
Nela
Filimon
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/