Pen                   package:ineq                   R Documentation

_P_e_n'_s _P_a_r_a_d_e

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

     plots Pen's Parade of a vector 'x'

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

     Pen(x, n = rep(1, length(x)), group = NULL,
       scaled = TRUE, abline = TRUE, segments = NULL,  
       main = "Pen's Parade", ylab = NULL, xlab = NULL, 
       col = NULL, lwd = NULL, las = 1, fill = NULL, ...)  

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

       x: a vector containing non-negative elements.

       n: a vector of frequencies or weights, must be same length as
          'x'.

   group: a factor coding different groups, must be same length as 'x'.
          See also details.

  scaled: logical. Should Pen's parade be divided by 'mean(x)'?

  abline: logical. Should a horizontal line for the mean be drawn?

segments: logical. Should histogram-like segments be drawn?

     col: a (vector of) color(s) for drawing the curve.

    fill: a (vector of) color(s) for filling the area under the curve.

xlab,ylab: axis labels. Suitable defaults depending on 'scaled' and 'n'
          are chosen.

main, lwd, las, ...: further high-level 'plot' parameters.

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

     Pen's Parade is basically the inverse distribution function
     (standardized by 'mean(x)').

     'Pen' allows for fine control of the layout-the graphical
     parameters 'col' and 'fill' can be vectorized if histogram-like
     segments are drawn ('segments = TRUE')-but implements several
     heuristics in choosing its default plotting parameters. If a
     grouping factor 'group' is given, the default is to draw segments
     with a grey-shaded filling. If no fill color is used, the default
     is to draw a thick blue curve. But as all of these are just
     defaults, they can of course easily be changed. See also the
     examples.

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

     Achim Zeileis zeileis@ci.tuwien.ac.at

_R_e_f_e_r_e_n_c_e_s:

     F A Cowell: Measurement of Inequality, 2000, in A B Atkinson / F
     Bourguignon (Eds): Handbook of Income Distribution, Amsterdam,

     F A Cowell: Measuring Inequality, 1995 Prentice Hall/Harvester
     Wheatshef,

     J Pen: Income Distribution, 1971, Harmondsworth: Allen Lane.

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

     'Lc', 'plot.Lc'

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

     # load and attach Philippine income data
     data(Ilocos)
     attach(Ilocos)
     # plot Pen's Parade of income
     Pen(income)
     Pen(income, fill = hsv(0.1, 0.3, 1))

     # income distribution of the USA in 1968 (in 10 classes)
     # x vector of class means, n vector of class frequencies
     x <- c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261)
     n <- c(482, 825, 722, 690, 661, 760, 745, 2140, 1911, 1024)
     Pen(x, n = n)
     # create artificial grouping variable
     myfac <- factor(c(1, 1, 1, 2, 2, 2, 3, 3, 3, 3))
     Pen(x, n = n, group = myfac)

