Hello,
Thank you for the suggestion. I have tried tag(edlevel, gamma | country),
but that does not seem to solve the problem.
Sincerely,
Jason
2011/1/15 Kosuke Imai <kimai(a)princeton.edu>
The problem I think is tag(1 + edlevel, gamma |
country). I might be wrong
but I don't think you can have both "1" and "edlevel". Try
tag(edlevel,
gamma | country) instead for example.
Kosuke
On Jan 15, 2011, at 11:16 AM, Jason McMann wrote:
Hello,
I am trying to run a multilevel probit model using Zelig, but keep
receiving the
following error message: " in .deparseTag(TT.vars[[vind]]) :
wrong use of tag function!!"
A simplified version of the model I am trying to run is:
z.out <- zelig(formula= list(mu=investment.binary ~ edlevel +
tag(1 + edlevel, gamma | country),
gamma = ~ tag(GDPpc06.full| country)), data=data2006.mod1,
model="probit.mixed")
What I would like to do is allow the intercept and the edlevel variable
listed
within the first tag() to vary by country as a function of the
GDPpc06.full variable, all of which are included in the same dataframe. I
followed the syntax here -
http://cran.r-project.org/web/packages/Zelig/vignettes/probit.mixed.pdf -
but I think that I am incorrectly specifying the gamma part of the syntax,
which may be causing the error.
I am able to get the model to run when I allow the intercept and edlevel
variable
to vary using the following syntax:
z.out <- zelig(investment.binary ~ edlevel +
+ tag(1 + edlevel | country),
data=data2006.mod1, model="probit.mixed")
However, this syntax does not allow me to specify that the intercept and
edlevel
variable should vary as a function of GDPpc06.full, as in the first
model specified above. I have tried including multiple tags at the
non-group level of the model specification - i.e. one for the intercept and
one for the edlevel variable - but this does not seem to work either.
Do you have any suggestions for how to fix the syntax?
Sincerely,
Jason
--
Jason I. McMann
PhD Student | Department of Politics
Princeton University | jmcmann(a)princeton.edu
--
Jason I. McMann
PhD Candidate | Department of Politics
Princeton University | jmcmann(a)princeton.edu