Hi Ewen,
Let me apologise first, and explain that when I saw your message, I misunderstood, and did
not parse it correctly as a question, but simply as someone giving a useful further
example of a previous problem. Working through issues in the ZeligMultilevel package is
on list of current issues and on the near-horizon, and I had read your message as a useful
code example of the issue, rather than a question to move this to the top of the list.
I've fixed the immediate issue in the "ls.mixed" model. You can download a
revision of ZeligMultilevel with this fix as:
install.packages("ZeligMultilevel", repos="http://r.iq.harvard.edu",
type="source")
And then the following now runs:
library(Zelig)
library(ZeligMultilevel)
z.out<-zelig(Reaction ~ Days + tag(Days|Subject), data=sleepstudy,
model="ls.mixed")
x.out<-setx(z.out, Days=4.4)
x1.out<-setx(z.out, Days=6.6)
s.out<-sim(z.out, x=x.out, x1=x1.out)
s2.out<-sim(z.out, x=x.out)
We are currently building a package for Panel data, and in the course of that,
reevaluating what exactly the various quantities of interest are in Panel and Multilevel
models, with group level indicators, and how it might be best to change setx() or sim() to
allow building more specific or precisely controlled quantities of interest. If people
have thoughts, please feel free to comment on or off list. Also, as we update the
quantities of interest for ZeligMultilevel, we'll change and improve the related plot
abilities, and so any ideas there are great too.
Thanks again for the code example that illuminated the problem in this model,
James.
--
James Honaker, Senior Research Scientist
//// Institute for Quantitative Social Science, Harvard University
________________________________________
From: zelig-bounces(a)lists.gking.harvard.edu [zelig-bounces(a)lists.gking.harvard.edu] on
behalf of Ewen Harrison [mail(a)ewenharrison.com]
Sent: Thursday, May 16, 2013 4:10 AM
To: zelig(a)lists.gking.harvard.edu
Subject: Re: [zelig] Persistent mixed models error
Ewen Harrison <ewen.harrison@...> writes:
Hi Matt,I saw this on the lists as a problem in January but I don't know
whether a fix was found. The error is replicated using the sleepstudy data
included in lme4. z.out<-zelig(Reaction ~ Days + tag(Days|Subject),
data=sleepstudy, model="ls.mixed")
x.out<-setx(z.out, Days=4.4)s.out<-sim(z.out,
x=x.out)Fails with: Error
in array(x, c(length(x), 1L), if (!is.null(names(x)))
list(names(x), :
attempt to set an attribute on NULL
Best wishes,Ewen
Pity not to get any response to this. I've had a lot of difficulties with
Zelig 4 which are all resolved by going back to Zelig 3.5. For anyone
finding this thread, it's straightforward:
Download this:
http://cran.r-project.org/src/contrib/Archive/Zelig/Zelig_3.5.5.tar.gz
Run this:
install.packages("C:/*YOUR PATH*/Zelig_3.5.5.tar.gz", repos = NULL,
type="source")
Best wishes,
Ewen
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/zelig