GevDistribution          package:fExtremes          R Documentation

_G_e_n_e_r_a_l_i_z_e_d _E_x_t_r_e_m_e _V_a_l_u_e _D_i_s_t_r_i_b_u_t_i_o_n

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

     A collection and description of functions to compute the
     generalized extreme value distribution. The  functions compute
     density, distribution function,  quantile function and generate
     random deviates  for the GEV including the Frechet, Gumbel, and 
     Weibull distributions. In addition functions to  compute the true
     moments and to display the distribution and random variates
     changing parameters interactively  are available. 

     The GEV distribution functions are:

       'dgev'        density of the GEV distribution,
       'pgev'        probability function of the GEV distribution,
       'qgev'        quantile function of the GEV distribution,
       'rgev'        random variates from the GEV distribution,
       'gevMoments'  computes true mean and variance,
       'gevSlider'   displays density or rvs from a GEV.

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

     dgev(x, xi = 1, mu = 0, beta = 1, log = FALSE)
     pgev(q, xi = 1, mu = 0, beta = 1, lower.tail = TRUE)
     qgev(p, xi = 1, mu = 0, beta = 1, lower.tail = TRUE)
     rgev(n, xi = 1, mu = 0, beta = 1)

     gevMoments(xi = 0, mu = 0, beta = 1)

     gevSlider(method = c("dist", "rvs"))

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

     log: a logical, if 'TRUE', the log density is returned. 

lower.tail: a logical, if 'TRUE', the default, then probabilities are
          'P[X <= x]', otherwise, 'P[X > x]'. 

  method: [gevSlider] - 
                   a character sgtring denoting what should be
          displayed. Either the density and '"dist"' or random variates
          '"rvs"'. 

       n: [rgev] - 
                   the number of observations. 

       p: [qgev] - 
           a numeric vector of probabilities. [hillPlot] - 
           probability required when option 'quantile' is chosen. 

       q: [pgev] - 
           a numeric vector of quantiles. 

       x: [dgev] - 
           a numeric vector of quantiles. 

xi, mu, beta: [*gev] - 
           'xi' is the shape parameter, 'mu' the location parameter,
          and 'beta' is the scale parameter. The default values are 
          'xi=1', 'mu=0', and 'beta=1'. Note, if 'xi=0'  the
          distribution is of type Gumbel. 

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

     'd*' returns the density, 
      'p*' returns the probability, 
      'q*' returns the quantiles, and 
      'r*' generates random variates. 

     All values are numeric vectors.

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

     Alec Stephenson for R's 'evd' and 'evir' package, and 
      Diethelm Wuertz for this R-port.

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

     Coles S. (2001); _Introduction to Statistical Modelling of Extreme
     Values_, Springer.

     Embrechts, P., Klueppelberg, C., Mikosch, T. (1997); _Modelling
     Extremal Events_,  Springer.

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

     ## rgev -
        # Create and plot 1000 Weibull distributed rdv:
        r = rgev(n = 1000, xi = -1)
        plot(r, type = "l", col = "steelblue", main = "Weibull Series")
        grid()
        
     ## dgev - 
        # Plot empirical density and compare with true density:
        hist(r[abs(r)<10], nclass = 25, freq = FALSE, xlab = "r", 
          xlim = c(-5,5), ylim = c(0,1.1), main = "Density")
        box()
        x = seq(-5, 5, by = 0.01)
        lines(x, dgev(x, xi = -1), col = "steelblue")
        
     ## pgev -
        # Plot df and compare with true df:
        plot(sort(r), (1:length(r)/length(r)), 
          xlim = c(-3, 6), ylim = c(0, 1.1),
          cex = 0.5, ylab = "p", xlab = "q", main = "Probability")
        grid()
        q = seq(-5, 5, by = 0.1)
        lines(q, pgev(q, xi = -1), col = "steelblue")
      
     ## qgev -   
        # Compute quantiles, a test:
        qgev(pgev(seq(-5, 5, 0.25), xi = -1), xi = -1)   

