probplot                package:e1071                R Documentation

_P_r_o_b_a_b_i_l_i_t_y _P_l_o_t

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

     Generates a probability plot for a ,specified theoretical
     distributions, i.e., basically a 'qqplot' where the y-axis is
     labeled with probabilities instead of quantiles. The function is
     mainly intended for teaching the concept of quantile plots.

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

     probplot(x, qdist=qnorm, probs=NULL, line=TRUE,
              xlab=NULL, ylab="Probability in %", ...)
     ## S3 method for class 'probplot':
     lines(x, h=NULL, v=NULL, bend=FALSE, ...)

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

       x: A data vector for 'probplot', an object of class 'probplot'
          for the 'lines' method.

   qdist: A character string or a function for the quantiles of the
          target distribution.

   probs: Vector of probabilities at which horizontal lines should be
          drawn.

    line: Add a line passing through the quartiles to the plot?

xlab, ylab: Graphical parameters.

       h: The y-value for a horizontal line.

       v: The x-value for a vertical line.

    bend: If 'TRUE', lines are ``bent'' at the quartile line, else
          regular 'abline's are added. See examples.

     ...: Further arguments for 'qdist' and graphical parameters for
          lines.

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

     Friedrich Leisch

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

     'qqplot'

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

     ## a simple example
     x <- rnorm(100, mean=5)
     probplot(x)

     ## the same with horizontal tickmarks at the y-axis
     opar <- par("las")
     par(las=1)
     probplot(x)

     ## this should show the lack of fit at the tails
     probplot(x, "qunif")

     ## for increasing degrees of freedom the t-distribution converges to
     ## normal
     probplot(x, qt, df=1)
     probplot(x, qt, df=3)
     probplot(x, qt, df=10)
     probplot(x, qt, df=100)

     ## manually add the line through the quartiles
     p <- probplot(x, line=FALSE)
     lines(p, col="green", lty=2, lwd=2)

     ## Make the line at prob=0.5 red
     lines(p, h=0.5, col="red")

     ### The following use the estimted distribution given by the green
     ### line:

     ## What is the probability that x is smaller than 7?
     lines(p, v=7, bend=TRUE, col="blue")

     ## Median and 90% confidence interval
     lines(p, h=.5, col="red", lwd=3, bend=TRUE)
     lines(p, h=c(.05, .95), col="red", lwd=2, lty=3, bend=TRUE)

     par(opar)

