alaplaceUC               package:VGAM               R Documentation

_T_h_e _L_a_p_l_a_c_e _D_i_s_t_r_i_b_u_t_i_o_n

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

     Density, distribution function, quantile function and random
     generation for the 3-parameter asymmetric Laplace distribution
     with location parameter 'location', scale parameter 'scale', and
     asymmetry parameter 'kappa'.

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

     dalap(x, location=0, scale=1, tau=0.5, kappa=sqrt(tau/(1-tau)),
           log=FALSE)
     palap(q, location=0, scale=1, tau=0.5, kappa=sqrt(tau/(1-tau)))
     qalap(p, location=0, scale=1, tau=0.5, kappa=sqrt(tau/(1-tau)))
     ralap(n, location=0, scale=1, tau=0.5, kappa=sqrt(tau/(1-tau)))

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

    x, q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations. If 'length(n) > 1' then the length is
          taken to be the number required. 

location: the location parameter xi. 

   scale: the scale parameter sigma. Must consist of positive values. 

     tau: the quantile parameter tau. Must consist of values in (0,1).
          This argument is used to specify 'kappa' and is ignored if
          'kappa' is assigned.

   kappa: the asymmetry parameter kappa. Must consist of positive
          values. 

     log: if 'TRUE', probabilities 'p' are given as 'log(p)'. 

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

     There are many variants of asymmetric Laplace distributions (ALDs)
     and this one is known as _the_ ALD by Kotz et al. (2001). See
     'alaplace3', the 'VGAM' family function for estimating the three
     parameters by maximum likelihood estimation, for formulae and
     details.

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

     'dalap' gives the density, 'palap' gives the distribution
     function, 'qalap' gives the quantile function, and 'ralap'
     generates random deviates.

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

     T. W. Yee

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

     Kotz, S., Kozubowski, T. J. and Podgorski, K. (2001) _The Laplace
     distribution and generalizations: a revisit with applications to
     communications, economics, engineering, and finance_, Boston:
     Birkhauser.

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

     'alaplace3'.

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

     x = seq(-5, 5, by=0.01)
     loc = 0; sigma = 1.5; kappa = 2
     ## Not run: 
     plot(x, dalap(x, loc, sigma, kappa=kappa), type="l", col="blue",
          main="Blue is density, red is cumulative distribution function",
          ylim=c(0,1), sub="Purple are 5,10,...,95 percentiles",
          las=1, ylab="", cex.main=0.5)
     abline(h=0, col="blue", lty=2)
     lines(qalap(seq(0.05,0.95,by=0.05), loc, sigma, kappa=kappa),
           dalap(qalap(seq(0.05,0.95,by=0.05), loc, sigma, kappa=kappa),
                     loc, sigma, kappa=kappa), col="purple", lty=3, type="h")
     lines(x, palap(x, loc, sigma, kappa=kappa), type="l", col="red")
     abline(h=0, lty=2)
     ## End(Not run)
     palap(qalap(seq(0.05,0.95,by=0.05), loc, sigma, kappa=kappa),
               loc, sigma, kappa=kappa)

