Dear Hillard,
From your code, I can't tell what the alternative
model is. In the
code you sent, you get the primary effect of meblkvar because you
have
PDEM100*meblkvar in your formula, which is expanded to PDEM100 +
mebklvar + I(PDEM100 * mebklvar). Since the expanded formula has both
meblkvar + I(meblkar^2), you should expect the quadratic effect.
The plot.ci function simply takes the first of the two terms (in the
order you entered them) as the axis label; since you entered
I(meblkvar^2) first, that's the axis label. Thus, if you use
z.outblksq <- zelig(PTURN100 ~ meblkvar * PDEM100 + I(meblkvar^2) +
PIND100 + ENTRPY10 + MINC1000, model = "ls", data = turnc)
you should get meblkvar as the axis label. You can, of course,
specify the x axis label by using
plot.ci(...., xlab = "Whatever meblkvar stands for")
Best,
Olivia
On Sun, Apr 26, 2009 at 5:24 PM, Hillard Pouncy
<hillard.pouncy(a)gmail.com> wrote:
Does the variable order in an equation affect the plot
outcome?
I calculated this equation z.outblksq <-zelig(PTURN100 ~ I(meblkvar^2) +
PIND100 +PDEM100 * meblkvar + ENTRPY10 + MINC1000, model = "ls", data =
turnc) with a quadratic terms first. I ran a simulation on the interaction
terms
x.xlow <-setx(z.outblksq, meblkvar = -45:50, PDEM100 = 35)
x.xhigh <-setx(z.outblksq, meblkvar = -45:50,
PDEM100=95)
s.outblksq <-sim(z.outblksq, x = x.xlow, x= x.xhigh)
The plot.ci command
produced a plot I did not expect that used the quadratic
term for the x axis.
I like the plot, but I don't understand what happened.
I changed the variable in an alternative model and the term on the x axis
was the non-quadratic variable I expected (meblkvar).
Can anybody explain this one?
best
Hillard Pouncy
-
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/