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

Re: st: RE: scatterplot matrix with predicted plots


From   Roger Harbord <[email protected]>
To   [email protected]
Subject   Re: st: RE: scatterplot matrix with predicted plots
Date   Wed, 26 May 2004 19:58:54 +0100

Nick,
Didn't you post code to statalist to do something very similar to this just under a year ago?? I know you post an amazing amount of code to statalist but i'm surprised if you've forgotten...

I have this in my personal ado directory:

. which mygraphmatrix
D:\rogerh\Stata\ado\mygraphmatrix.ado
*! NJC 1.0.0 12 June 2003
*! Posted on Statalist.
*! Matrix plot with lowess smooths and quantile plots on diagonal.
*! It's slow.

Granted it's kind of a brute-force approach - it draws each graph and saves it then -graph combine-s the results, so you get axes around each sub-graph and it isn't as efficient in use of time or space as a low-level extension to -graph matrix- possibly could be. It's still a very nice tool for data exploration though (with a built-in an excuse for a quick tea break).

Garry, if you search the Statalist archives ( http://www.stata.com/statalist/archive/ ) for -mygraphmatrix- you'll find the code. Should be easy enough to adapt to use other fits instead of lowess if desired (might run a little quicker too).

Roger.

--On 26 May 2004 13:29 +0100 Nick Cox <[email protected]> wrote:


This is a very understandable thing to
want. My guess, however, is that it
is much more difficult to implement
than you would guess. That is, it
would be possible to add code at the
low level that would let you slap

something Y X

on top of

scatter Y X

The difficulty is to do that while
also giving you, the user, the kinds
of handles that you really want
to control the details of the graphs.

Thus you might say, "All I want is an lfit Y X
on top on each scatter." But if that
is done blindly, then not everything
is what you really want: for example,
the y axis titles would probably be
too messy for your taste. So you
need a handle that controls that.

All this is guesswork, and a signal
to StataCorp to say that I am way
too pessimistic here. We're in weird
territory with the new graphics:
some things which might sound very difficult
are in fact very easy, and vice versa too.

Nick
[email protected]

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of
Garry Anderson
Sent: 26 May 2004 08:13
To: [email protected]
Subject: st: scatterplot matrix with predicted plots


Hi,

Is it possible please to overlay a predicted plot (linear or
quadratic or
fractional polynomial etc) for each graph in a scatterplot matrix?

There does not appear to be an option in
graph matrix x1 x2 x3 x4 y

or in the menu for scatterplot matrix

Best wishes, Garry
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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