Hi Nathan -
It seems your package is done, aside from the formatting issue. There are a few ways in
which we can resolve this. If you can supply me with your 'qi' method (this
should be in the qi.plm.R file), then I can give you a recommendation on where to add the
appropriate code.
Thanks for your contribution!
Matt
e: mowen(a)iq.harvard.edu
p: 6-6132
On May 27, 2011, at 1:29 PM, Nathan Paxton wrote:
Dear all,
I am working on the necessary extensions to Zelig to allow it to use the 'plm'
package, which puts TSCS linear models in a more familiar form to economists/political
scientists than the lme4/nmle packages do.
I've got everything working, I think, but one thing. In the following output, you
can see that the first column of summary results picks up the name of the first case in
the data frame. (plm uses a special data.frame method called pdata.frame(), which sets
time and cross- sectional indexes within the frame itself.) I've checked the results
otherwise, and they appear to be good, so I think that this is a formatting issue, and a
cursory examination of the other Zelig code leads me to believe that the Zelig's
summary method is just picking up the index of the first case in the data frame. The
"Alabama-1970" looks ugly, as well as being potentially confusing.
Is there a way to easily keep Zelig from doing what's immediately below and retain
the more default formatting?
(I've also pasted output from a ls model in the Zelig manual below the first pasted
text, to give an easy and quick comparison.)
-Nathan
PLM module output:
summary(s.plm2)
Model: plm
Number of simulations: 1000
Values of X
(Intercept) log(pcap) log(pc) log(emp) unemp
ALABAMA-1970 1 10.12810 10.97144 7.465713 7.9
Values of X1
(Intercept) log(pcap) log(pc) log(emp) unemp
ALABAMA-1970 1 10.12810 10.97144 7.465713 5
Expected Values: E(Y|X)
mean sd 2.5% 97.5%
ALABAMA-1970 8.623364 0.1773169 8.288714 8.965831
First Differences in Expected Values: E(Y|X1)-E(Y|X)
mean sd 2.5% 97.5%
ALABAMA-1970 0.01523238 0.002951307 0.009241061 0.02127007
Normal OLS Zelig output:
summary(s.out1)
Model: ls
Number of simulations: 1000
Values of X
(Intercept) gdp capmob trade
1 1 3.254223 -0.8914286 57.07625
Expected Values: E(Y|X)
mean sd 2.5% 97.5%
1 4.994367 0.1431317 4.704167 5.26888
-----
Nathan Paxton
napaxton(a)gmail.com
(I can) Stand up for hope, faith, love
But while I'm getting over certainty
Stop helping God across the road like a little old lady.
—U2