tmd                 package:lattice                 R Documentation

_T_u_k_e_y _M_e_a_n-_D_i_f_f_e_r_e_n_c_e _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     'tmd' Creates Tukey Mean-Difference Plots from a trellis object
     returned by 'xyplot', 'qq' or 'qqmath'.  The prepanel and panel
     functions are used as appropriate.  The 'formula' method for 'tmd'
     is provided for convenience, and simply calls 'tmd' on the object
     created by calling 'xyplot' on that formula.

_U_s_a_g_e:

     tmd(object, ...)

     ## S3 method for class 'trellis':
     tmd(object,
         xlab = "mean",
         ylab = "difference",
         panel, 
         prepanel, 
         ...)

     prepanel.tmd.qqmath(x,
                  f.value = NULL,
                  distribution = qnorm,
                  qtype = 7,
                  groups = NULL,
                  subscripts, ...)
     panel.tmd.qqmath(x,
                  f.value = NULL,
                  distribution = qnorm,
                  qtype = 7,
                  groups = NULL, 
                  subscripts, ...)
     panel.tmd.default(x, y, groups = NULL, ...)
     prepanel.tmd.default(x, y, ...)

_A_r_g_u_m_e_n_t_s:

  object: An object of class '"trellis"' returned by 'xyplot', 'qq' or
          'qqmath'.  

    xlab: x label

    ylab: y label

   panel: panel function to be used.  See details below.  

prepanel: prepanel function.  See details below.  

f.value, distribution, qtype: see 'panel.qqmath'.  

groups, subscripts: see 'xyplot'.  

    x, y: data as passed to panel functions in original call.  

     ...: other arguments

_D_e_t_a_i_l_s:

     The Tukey Mean-difference plot is produced by modifying the (x,y)
     values of each panel as follows: the new coordinates are given by
     'x=(x+y)/2' and 'y=y-x', which are then plotted.  The default
     panel function(s) add a reference line at 'y=0' as well.

     'tmd' acts on the a '"trellis"' object, not on the actual plot
     this object would have produced.  As such, it only uses the
     arguments supplied to the panel function in the original call, and
     completely ignores what the original panel function might have
     done with this data.  'tmd' uses these panel arguments to set up
     its own scales (using its 'prepanel' argument) and display (using
     'panel').  It is thus important to provide suitable prepanel and
     panel functions to 'tmd' depending on the original call.

     Such functions currently exist for 'xyplot', 'qq' (the ones with
     'default' in their name) and 'qqmath', as listed in the usage
     section above.  These assume the default displays for the
     corresponding high-level call.  If unspecified, the code{prepanel}
     and 'panel' arguments default to suitable choices.

     'tmd' uses the 'update' method for '"trellis"' objects, which
     processes all extra arguments supplied to 'tmd'.

_V_a_l_u_e:

     An object of class '"trellis"'. The 'update' method can be used to
     update components of the object and the 'print' method (usually
     called by default) will plot it on an appropriate plotting device.

_A_u_t_h_o_r(_s):

     Deepayan Sarkar Deepayan.Sarkar@R-project.org

_S_e_e _A_l_s_o:

     'qq', 'qqmath', 'xyplot', 'Lattice'

_E_x_a_m_p_l_e_s:

     tmd(qqmath(~height | voice.part, data = singer))

