gumbelUC                package:VGAM                R Documentation

_T_h_e _G_u_m_b_e_l _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 Gumbel distribution with location parameter
     'location' and scale parameter 'scale'.

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

     dgumbel(x, location=0, scale=1)
     pgumbel(q, location=0, scale=1)
     qgumbel(p, location=0, scale=1)
     rgumbel(n, location=0, scale=1)

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

    x, q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations. Positive integer of length 1.

location: the location parameter mu. This is not the mean of the Gumbel
          distribution (see *Details* below). 

   scale: the scale parameter sigma. This is not the standard deviation
          of the Gumbel distribution (see *Details* below). 

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

     The Gumbel distribution is a special case of the _generalized
     extreme value_ (GEV) distribution where the shape parameter xi =
     0. The latter has 3 parameters, so the Gumbel distribution has
     two. The Gumbel distribution function is 

                G(y) =  exp( -exp[ - (y-mu)/sigma ] )

     where -Inf<y<Inf, -Inf<mu<Inf and sigma>0. Its mean is

                          mu - sigma * gamma

     and its variance is

                          sigma^2 * pi^2 / 6

     where gamma is Euler's constant (which can be obtained as
     '-digamma(1)').

     See 'gumbel', the 'VGAM' family function for estimating the two
     parameters by maximum likelihood estimation, for formulae and
     other details. Apart from 'n', all the above arguments may be
     vectors and are recyled to the appropriate length if necessary.

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

     'dgumbel' gives the density, 'pgumbel' gives the distribution
     function, 'qgumbel' gives the quantile function, and 'rgumbel'
     generates random deviates.

_N_o_t_e:

     The 'VGAM' family function 'gumbel' can estimate the parameters of
     a Gumbel distribution using maximum likelihood estimation.

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

     T. W. Yee

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

     Coles, S. (2001) _An Introduction to Statistical Modeling of
     Extreme Values_. London: Springer-Verlag.

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

     'gumbel', 'egumbel', 'gev'.

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

     mu = 1
     sigma = 2
     y = rgumbel(n=100, loc=mu, scale=sigma)
     mean(y)
     mu - sigma * digamma(1)  # population mean
     var(y)
     sigma^2 * pi^2 / 6       # population variance

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

