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

st: Plotting observed and predicted values on same scatterplot matrix


From   "Dale Steele" <[email protected]>
To   <[email protected]>
Subject   st: Plotting observed and predicted values on same scatterplot matrix
Date   Tue, 23 Jul 2002 21:14:15 -0400

Not sure why first line cut-off on first attempt to post..sorry.

    I have been struggling to "overlie" two sets of data on the same
scatterplot matrix.  I have two stata data files.  The first contains the
raw data from an experiment.  The second file contains calculated predicted
values which I would like to plot as a line on top of the observed values in
the first file.

   Various permutations of the -merge- command have failed to merge the two
files.

I've made plots of each using:
graph response resistnc, by(idnum) total jitter(2) ylabel(0, 2 to 10)
  and
graph R resistnc, by(idnum) connect(l) ylabel(0, 2 to 10) total

 Suggestions?

Details follow..

  Each subject given 6 stimuli, response to each stimulus measured five
times.  Thus the file looks like:

list idnum resistnc response

         idnum   resistnc   response
  1.       401          0          0
  2.       401          0          0
  3.       401          0          0
  4.       401          0         .7
  5.       401          0          0
  6.       401        2.5        1.9
  7.       401        2.5        1.5
  ...

The second file contains a predicted response (R) based on a predicted curve
for each subject.

. list idnum resistnc R

         idnum   resistnc          R
  1.       401          0        .14
  2.       401        2.5   2.489528
  3.       401          5   3.538459
  4.       401         10   5.055678
  5.       401         20    7.25025
  6.       401         30   8.963791
  7.       402          0         .4
  8.       402        2.5   1.289712
  9.       402          5   2.060106
 10.       402         10   3.497576
 11.       402         20   6.179739


*
*   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