home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 473 / multi.arc / FORGET.DOC next >
Text File  |  1985-11-06  |  12KB  |  337 lines

  1.  
  2.  
  3.  
  4.  
  5.                                   FORGET-IT
  6.                            Tukey's Forget-it Plots
  7.                                  Version 1.0
  8.                                November 4, 1985
  9.  
  10.  
  11.                                Gerard E. Dallal
  12.  
  13.                 USDA Human Nutrition Research Center on Aging
  14.                              at Tufts University
  15.                             711 Washington Street
  16.                               Boston, MA  02111
  17.  
  18.                                      and
  19.  
  20.                      Tufts University School of Nutrition
  21.                               132 Curtis Street
  22.                               Medford, MA 02155
  23.  
  24.  
  25.  
  26.                                     NOTICE
  27.  
  28.         Documentation  and  original code copyright 1985 by Gerard E.
  29.         Dallal.  Reproduction of material for non-commercial purposes
  30.         is  permitted,   without  charge,   provided  that   suitable
  31.         reference is made to FORGET-IT and its author.
  32.  
  33.         Neither FORGET-IT nor its documentation should be modified in
  34.         any way without permission from the author,  except for those
  35.         changes  that  are  essential  to  move  FORGET-IT to another
  36.         computer.
  37.  
  38.  
  39.  
  40.  
  41.                                  DESCRIPTION
  42.  
  43.         Forget-it  plots  (a.k.a.  two-way  plots) were introduced by
  44.         Tukey  (1970,  chapter  16)  as  a  graphical  technique  for
  45.         representing the interaction structure in a two-way table.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                                                PAGE 2
  61.  
  62.  
  63.                                  CONSTRUCTION
  64.  
  65.         (The reader should refer to the example at the  end  of  this
  66.         document    while   reading   this   discussion.    Alternate
  67.         descriptions can be  found  in  Mosteller  and  Tukey  (1977,
  68.         chapter 9) and Tukey (1977, chapter 11).)
  69.  
  70.         Let {w(i,j):  i=1,...,r; j=1,...,c} be a two-way table fitted
  71.         by the model
  72.  
  73.                       E w(i,j) = mu + alpha(i) + beta(j)  .
  74.  
  75.         Permute  the rows(columns) in order of decreasing(increasing)
  76.         row(column) effects.  Let U be an estimate of mu,  A(i) be an
  77.         estimate  of  alpha(i) and B(j) be an estimate of beta(j) for
  78.         the  ORDERED  table.  (The  program  computes  least  squares
  79.         estimates  subject  to  the  usual  constraints,  but this is
  80.         immaterial to the plotting process).
  81.  
  82.  
  83.         Horizontal (X) and vertical (Y) axes are set down and the two
  84.         sets of line segments
  85.  
  86.                            {Y=U+2*A(i)-A(1)+B(1)+X,
  87.              for (A(1)-A(i)).LE. X .LE. (A(1)-A(i))+(B(c)-B(1)),
  88.                                   i=1,...r}
  89.  
  90.                            {Y=U+A(1)+2*B(j)-B(1)-X,
  91.              for (B(j)-B(1)).LE. X .LE. (B(j)-B(1))+(A(1)-A(r)),
  92.                                   j=1,...c}
  93.  
  94.         are drawn.  The  ordinates  of  the  points  of  intersection
  95.         correspond to the fitted values since they satisfy
  96.  
  97.                              Y = U + A(i) + B(j).
  98.  
  99.         Observed  table  entries  are plotted directly above or below
  100.         the corresponding fitted values.  The horizontal axis  is  no
  101.         longer needed so "forget it".
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.         FORGET-IT                                         G.E. Dallal
  113.  
  114.  
  115.  
  116.                                                                PAGE 3
  117.  
  118.  
  119.                                ROUND-OFF ERROR
  120.  
  121.         The  greatest  problem  in  constructing Forget-it Plots on a
  122.         discrete printing device is the error introduced by  rounding
  123.         when  placing  observed  and  fitted  values  in their proper
  124.         locations.  For example, the points (0,0), (2,2.3),  (0,1.4),
  125.         (2,3.7)  are the vertices of a parallelogram,  but this is no
  126.         longer true if the the ordinates are rounded to  the  nearest
  127.         integer.  Thus,  on  a  discrete  plotting  device  we cannot
  128.         simultaneously have
  129.  
  130.                  i.  all lines of the plot straight,
  131.                 ii.  arbitrary plot size, and
  132.                iii.  all  fitted  values  rounded  to the appropriate
  133.                      location along the vertical axis.
  134.  
  135.         A compromise is  needed:  The  fitted  value  for  w(1,1)  is
  136.         rounded   into  the  appropriate  location.   The  quantities
  137.         {A(i)-A(1):i=1,...,r},  {B(j)-B(1):j=1,...,c} are rounded  to
  138.         the  appropriate  number of units of shift along the vertical
  139.         axis.  The r lines containing the fitted values of the r rows
  140.         are drawn as a set of southwest to northeast line segments of
  141.         length B(c)-B(1) starting at ordinates  w(1,1)(fitted)-(A(1)-
  142.         A(i))  and  abscissa  A(1)-A(i).  The  c lines containing the
  143.         fitted values of  the  c  columns  are  drawn  as  a  set  of
  144.         northwest  to  southeast  line  segments  of length A(1)-A(r)
  145.         starting at ordinates w(1,1)(fitted)+B(j)-B(1)  and  abscissa
  146.         B(j)-B(1).
  147.  
  148.         If the observed values are simply rounded and placed  in  the
  149.         diagram, small residuals can appear with their signs changed.
  150.         Hence,  the  observations are perturbed as follows:  The true
  151.         residuals are calculated and rounded to the appropriate units
  152.         of shift along the vertical axis.  The  observed  values  are
  153.         then  placed  this  many  units  from  the  fitted  values as
  154.         plotted.  While neither the observed nor fitted values can be
  155.         determined exactly from their positions along the axis, their
  156.         relative locations are correct.  This compromise  also  means
  157.         that  it  is  possible  for two observed values to have their
  158.         relative order reversed in the plot.  That is, when comparing
  159.         two observed values,  the one appearing to be slightly larger
  160.         according to its plotting position may,  in fact, be slightly
  161.         smaller.  As the size of the plot  increases  the  chance  of
  162.         this happening decreases.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.         FORGET-IT                                         G.E. Dallal
  169.  
  170.  
  171.  
  172.                                                                PAGE 4
  173.  
  174.  
  175.                                   OPERATION
  176.  
  177.         The program is essentially driven by prompts.  The  user  has
  178.         the option of entering data from a file of the form:
  179.  
  180.              Data,  one  row  at  a  time.  A  row  can span multiple
  181.              records and each row need not occupy the same number  of
  182.              records,  but each row must start on a new record.  Then
  183.              come row labels followed by column labels  (up  to  five
  184.              characters each), one per record starting in column one.
  185.              If  labels are not present,  the program will prompt for
  186.              them.
  187.  
  188.  
  189.  
  190.                                   REFERENCES
  191.  
  192.  
  193.         Mosteller, Frederick and John W. Tukey (1977).  Data Analysis
  194.            and Regression.  Reading,  MA:  Addison-Wesley  Publishing
  195.            Co.
  196.  
  197.         Tukey, John W. (1970).  Exploratory Data Analysis: Volume II.
  198.            Limited Preliminary Edition.  Reading, MA:  Addison-Wesley
  199.            Publishing Co.
  200.  
  201.         Tukey, John W. (1977).  Exploratory Data Analysis.   Reading,
  202.            MA: Addison-Wesley Publishing Co.
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.         FORGET-IT                                         G.E. Dallal
  225.  
  226.  
  227.  
  228.                                                                PAGE 5
  229.  
  230.  
  231.                                    EXAMPLE
  232.  
  233.         The following example involves alpha-tocopherol levels in the
  234.         cerebellum of rats fed on one of four diets (SE = selenium; E
  235.         = Vitamin E; + = rich; - = deficient):
  236.  
  237.                           young        old          aged
  238.  
  239.                 +E+SE    10.600       12.600       13.300
  240.  
  241.                 -E+SE    2.7000       8.7000       6.0000
  242.  
  243.                 +E-SE    9.6000       13.800       14.200
  244.  
  245.                 -E-SE    3.5000       8.5000       2.8000
  246.  
  247.         Enter the size of the plot:  41
  248.  
  249.          GRAND MEAN...    8.8583
  250.  
  251.          ROW EFFECTS...
  252.  
  253.                           1:    3.3083       +E+SE
  254.                           2:   -3.0583       -E+SE
  255.                           3:    3.6750       +E-SE
  256.                           4:   -3.9250       -E-SE
  257.  
  258.          COLUMN EFFECTS...
  259.  
  260.                              1:   -2.2583       young
  261.                              2:    2.0417       old
  262.                              3:   0.21667       aged
  263.  
  264.          ORDER OF DECREASING ROW EFFECTS:
  265.                                             3:    3.6750       +E-SE
  266.                                             1:    3.3083       +E+SE
  267.                                             2:   -3.0583       -E+SE
  268.                                             4:   -3.9250       -E-SE
  269.  
  270.          ORDER OF INCREASING COLUMN EFFECTS:
  271.                                                1:   -2.2583       young
  272.                                                3:   0.21667       aged
  273.                                                2:    2.0417       old
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.         FORGET-IT                                         G.E. Dallal
  281.  
  282.  
  283.  
  284.                                                                PAGE 6
  285.  
  286.  
  287.  
  288.  
  289.  
  290.         14.575     |                  0                          +E-SE
  291.         14.278     |            X    /|0                         +E+SE
  292.         13.980     |            |   / ||\
  293.         13.683     |            |  / /X| \
  294.         13.385     |            |X/ /  |  \
  295.         13.088     |            || /   |   \
  296.         12.790     |            0|/    X    \
  297.         12.493     |           / 0           \
  298.         12.195     |          / / \           \
  299.         11.898     |         / /   \           \
  300.         11.600     |        / /     \           \
  301.         11.303     |       / /       \           \
  302.         11.005     |      / /         \           \
  303.         10.708     |     / /           \           \
  304.         10.410     |    X /             \           \
  305.         10.113     |   0|/               \           \
  306.         9.8150     |   |0                 \           \
  307.         9.5175     |   X \                 \           \
  308.         9.2200     |      \                 \           \
  309.         8.9225     |       \                 \           \  X
  310.         8.6250     |        \                 \           \ |  X
  311.         8.3275     |         \                 \           \|  |
  312.         8.0300     |          \                 \           0  | -E+SE
  313.         7.7325     |           \                 \         / \ |
  314.         7.4350     |            \                 \       /   \|
  315.         7.1375     |             \                 \     /     0 -E-SE old
  316.         6.8400     |              \                 \   /     /
  317.         6.5425     |               \                 \ /     /
  318.         6.2450     |                \                 X     /
  319.         5.9475     |                 \               / \   /
  320.         5.6500     |                  \             /   \ /
  321.         5.3525     |                   \           /     0       aged
  322.         5.0550     |                    \         /     /|
  323.         4.7575     |                     \       /     / |
  324.         4.4600     |                      \     /     /  |
  325.         4.1625     |                       \   /     /   |
  326.         3.8650     |                        \ /     /    |
  327.         3.5675     |                         0  X  /     |
  328.         3.2700     |                         |\ | /      |
  329.         2.9725     |                         | \|/       X
  330.         2.6750     |                         X  0                young
  331.  
  332.  
  333.  
  334.  
  335.  
  336.         FORGET-IT                                         G.E. Dallal
  337.