Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: Graphic question V8: graphing adjusted values with CI

From   "Nick Cox" <>
To   <>
Subject   st: RE: RE: RE: Graphic question V8: graphing adjusted values with CI
Date   Tue, 4 Mar 2003 10:05:32 -0000

Moran, John

> Thanks to Nick Cox for responding to my question regarding
> graphing adjusted
> means.
> In the mean time, I will plough on as it were.
> However, if I may follow Nick's comment about  "The three
> calls to -line-
> can be reduced to one."
> Being new to the syntax of V8 graphics, I used the GUI to
> plot the graph
> with the "submit" option and then copied the command to a
> do file for
> subsequent manipulation, as was suggested in previous
> postings in this list.
> This manoeuvre, via the GUI, lead to the multiple lines of
> code for what I
> considered to be a reasonably basic task in statistics, at
> least in my
> practice; the visual display of the functional form of
> predictors in a
> multivariable regression. I do not know about other members
> of the list, but
> the occasions that I would wish to display, in V8 graphic
> format (that is
> _publishable_ graphic), a univariate regression would be
> few, to say the least.

If you mean by this one response, one predictor, then
that is a very common case in my experience and -- what's
important -- in science generally.

On your problem, as said previously, you need to specify
-adjust- arguments and -graph- options. I really am not
clear that the trade-off between doing it in steps and
doing it via one very complicated command is in favour of the latter.

Be that as it may, I have no doubt
that your problem is shared by others; it is just that
no one has written a wrapper for it in Stata 8, so far
as I can see. A really good wrapper would have to identify
cases in which the adjusted predictions are _not_ plottable
on a scatter plot. Anyway, do scratch the itch by writing one!

> Given the enormous overhead of V8 graphics (from my perspective,
> syntactical, as I prefer code to GUI), two questions seem
> to follow:
> (i) is the GUI teaching us sub optimally with respect to
> the code that it
> leaves in its wake?

Yes, although not on purpose. Modifying the code so that
input which turns out to be unnecessarily complicated is
mapped to simpler input strikes me as an extraordinarily
difficult programming problem, as it hinges on recognising --
automatically -- that one command line has the same _meaning_
as another simpler one. That's semantics, not syntax. You are
asking for artificial intelligence to be built in. Stata is
smart, but on the whole not in that sense.

At the same time, one of the functions of a GUI in Stata is to
provide an _exact_ one-to-one mapping between your selections and the
corresponding code. If there were some translation built in,
that function is compromised.

In short, you want, understandably, a "do what I mean" GUI.
GUIs are "do what I say". So also is the command language,
so this problem transcends the difference of interface.

> (ii) should the graphics of V8(+) be more attuned to what
> has already
> occurred in V7 with streg and now, in V8 with stcox, the
> exploration of
> multivariable relations (that is, the graphic display of adjusted
> estimates). It seems that one cannot do graphically, within
> current Stata,
> for "regression" (logistic or linear) what one can more
> easily do, with
> stcox and streg.

I can't comment in detail on survival graphics.


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index