Tikuv                  package:VGAM                  R Documentation

_A _S_h_o_r_t-_t_a_i_l_e_d _S_y_m_m_e_t_r_i_c _D_i_s_t_r_i_b_u_t_i_o_n

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

     Density, cumulative distribution function, quantile function and
     random generation for  the short-tailed symmetric distribution of
     Tiku and Vaughan (1999).

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

     dtikuv(x, d, mean=0, sigma=1)
     ptikuv(q, d, mean=0, sigma=1)
     qtikuv(p, d, mean=0, sigma=1, ...)
     rtikuv(n, d, mean=0, sigma=1, Smallno=1.0e-6)

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

    x, q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations. Must be a positive integer of length
          1.

d, mean, sigma : arguments for the parameters of the distribution. See
          'tikuv' for more details. For 'rtikuv', arguments 'mean' and
          'sigma' must be of length 1.

 Smallno: Numeric, a small value used by the rejection method for
          determining the lower and upper limits of the distribution.
          That is, 'ptikuv(L) < Smallno' and 'ptikuv(U) > 1-Smallno'
          where 'L' and 'U' are the lower and upper limits
          respectively.

     ...: Arguments that can be passed into 'uniroot'.

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

     See 'tikuv' for more details.

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

     'dtikuv' gives the density, 'ptikuv' gives the cumulative
     distribution function, 'qtikuv' gives the quantile function, and
     'rtikuv' generates random deviates.

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

     T. W. Yee

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

     'tikuv'.

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

     ## Not run: 
     x = seq(-5, 5, len=401)
     plot(x, dnorm(x), type="l", col="black", ylab="",
          main="Black is standard normal, others are dtikuv(x, d)")
     lines(x, dtikuv(x, d=-10), col="red")
     lines(x, dtikuv(x, d=-1 ), col="blue")
     lines(x, dtikuv(x, d= 1 ), col="green")
     legend(2, 0.35, col=c("red","blue","green"), lty=rep(1, len=3),
            legend=paste("d =", c(-10, -1, 1)))

     plot(x, pnorm(x), type="l", col="black", ylab="",
          main="Black is standard normal, others are ptikuv(x, d)")
     lines(x, ptikuv(x, d=-10), col="red")
     lines(x, ptikuv(x, d=-1 ), col="blue")
     lines(x, ptikuv(x, d= 1 ), col="green")
     legend(2, 0.35, col=c("red","blue","green"), lty=rep(1, len=3),
            legend=paste("d =", c(-10, -1, 1)))

     probs = seq(0.1, 0.9, by=0.1)
     ptikuv(qtikuv(p=probs, d= 1), d=1) - probs  # Should be all 0
     ## End(Not run)

