qqmath                package:lattice                R Documentation

_Q-_Q _P_l_o_t _w_i_t_h _T_h_e_o_r_e_t_i_c_a_l _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Quantile-Quantile plot of a sample and a theoretical distribution

_U_s_a_g_e:

     qqmath(formula, distribution = qnorm, f.value = NULL, ...)

_A_r_g_u_m_e_n_t_s:

 formula: formula of the form '~ x | g1 * g2 * ...', where 'x' must be
          a numeric. 

distribution: a quantile function that takes a vector of probabilities
          as argument and produces the corresponding quantiles.
          Possible values are 'qnorm,qunif' etc. Distributions with
          other required arguments need to be passed in as user defined
          functions. This is also passed in as an argument to the panel
          function (though not used by the default panel function), 
          and the prepanel function if specified, for use in the bery
          commonly used '(pre)panel.qqmathline'. 

 f.value: optional function of a single integer (representing sample
          size), returning a vector of probabilities corresponding to
          which quantiles should be plotted. The typical value for this
          argument is 'ppoints', which is also the S-PLUS default. If
          specified, the probabilities generated by this function is
          used for the plotted quantiles, using the 'quantile' function
          for the sample, and the 'distribution' argument for the
          theoretical distribution.

          'f.value' defaults to 'NULL', which has the effect of using
          'ppoints' for the quantiles of the theoretical distribution,
          but the exact data values for the sample. This is similar to
          what happens for 'qqnorm'.

     ...: Other arguments

_D_e_t_a_i_l_s:

     'qqmath' produces a Q-Q plot of the given sample and a theoretical
     distribution.  The default behaviour of 'qqmath' is different from
     the corresponding S-PLUS function, but is similar to 'qqnorm'. See
     the entry for 'f.value' for specifics.

     This and all other high level Trellis functions have several
     arguments in common. These are extensively documented only in the
     help page for 'xyplot', which should be consulted to learn more
     detailed usage.

_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 <URL: deepayan@stat.wisc.edu>

_S_e_e _A_l_s_o:

     'xyplot', 'panel.qqmath', 'panel.qqmathline',
     'prepanel.qqmathline', 'Lattice', 'quantile'

_E_x_a_m_p_l_e_s:

     qqmath(~ rnorm(100), distribution = function(p) qt(p, df = 10))
     qqmath(~ height | voice.part, aspect = 1, data = singer,
            prepanel = prepanel.qqmathline,
            panel = function(x, y) {
               panel.qqmathline(y, distribution = qnorm)
               panel.qqmath(x, y)
            })

