Hi,
The sim() fonction gives me the following message :
Error in .local(object, ...) : Code not written yet
The sim() object is not produce.
I'm trying to evaluate a causal effect in a longitudinal study with a mixed model after mathing with MatchIt(). Here's the code :
z.nearest <- zelig(outcome ~ treat + T + T2 + T3 + tag(1 + T + T2 | ID.factor), data=matched.nearest.long, model="ls.mixed")x.nearest.0 <- setx(z.nearest, fn=NULL, CINTER2G=0)
x.nearest.1 <- setx(z.nearest, fn=NULL, CINTER2G=1)
s.nearest <- sim(z.nearest, x=x.nearest.0, x1=x.nearest.1)
I'm using polynomial time with a random part. There is no problem when the random part is only made of one term like this:
z.nearest <- zelig(outcome ~ treat + T + T2 + T3 + tag(T | ID.factor), data=matched.nearest.long, model="ls.mixed")
I posted a problem this last summer about polynomial time, but at that time the problem was within Zelig itself. Zelig was not able to cope with polynomial time, but that problem seems resolved. Maybe the problem with sim() has a link with that one.
Thanks,
Françcois Maurice