ppFit               package:fExtremes               R Documentation

_M_a_x_i_m_u_m-_l_i_k_e_l_i_h_o_o_d _F_i_t_t_i_n_g _f_o_r _t_h_e _P_o_i_n_t _P_r_o_c_e_s_s _M_o_d_e_l

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

     This is a collection of functions to model point processes, PP,
     over a threshold, based on R's 'ismev' package. The parameter 
     estimation allows to include generalized linear modelling of  each
     parameter. 

     The functions are:

       1  'potSim'         generates data from a point process,
       2  'potFit'         fits empirical or simulated data to a point process,
       3  'print'          print method for a fitted POT object of class ...,
       4  'plot'           plot method for a fitted GEV object,
       5  'summary'        summary method for a fitted GEV object,
       6  'gevrlevelPlot'  k-block return level with confidence intervals.

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

     ppFit(x, threshold, npy = 365, y = NULL, mul = NULL, sigl = NULL, 
             shl = NULL, mulink = identity, siglink = identity, shlink =
         identity, method = "Nelder-Mead", maxit = 10000, ...)

     ## S3 method for class 'ppFit':
     print(x, ...)
     ## S3 method for class 'ppFit':
     plot(x, which = "ask", ...)
     ## S3 method for class 'ppFit':
     summary(object, doplot = TRUE, which = "all", ...)

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

  doplot: a logical. Should the results be plotted? 

   maxit: [ppFit] - the maximum number of iterations. 

  method: [ppFit] - The optimization method (see 'optim' for details). 

mul, sigl, shl: [ppFit] - numeric vectors of integers, giving the
          columns of 'ydat' that contain covariates for generalized
          linear modelling of the location, scale and shape parameters
          repectively (or 'NULL' (the default) if the corresponding
          parameter is stationary). 

mulink, siglink, shlink: [ppFit] - inverse link functions for
          generalized linear modelling of the location, scale and shape
          parameters repectively. 

     npy: [ppFit] - the number of observations per year/block. 

  object: [summary] - a fitted object of class '"ppFit"'. 

threshold: [ppFit] - the threshold; a single number or a numeric vector
          of the same length as 'x'. 

   which: [print][plot][summary] - a logical for each plot, denoting
          which plots should be created. 

       x: [ppFit] - a numeric vector of data to be fitted. 
           [print][plot] - a fitted object of class '"ppFit"'. 

       y: [ppFit] - a matrix of covariates for generalized linear
          modelling of the parameters (or 'NULL' (the default) for
          stationary fitting). The number of rows should be the same as
          the length of 'x'. 

     ...: [ppFit] - control parameters and plot parameters optionally
          passed to the  optimization and/or plot function. Parameters
          for the optimization function are passed to components of the
          'control' argument of 'optim'. 

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

     For non-stationary fitting it is recommended that the covariates
     within the generalized linear models are (at least approximately)
     centered and scaled (i.e. the columns of 'ydat' should be
     approximately centered and scaled).

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

     A list containing the following components. A subset of these
     components are printed after the fit. If 'show' is 'TRUE', then
     assuming that successful convergence is indicated, the components
     'nexc', 'nllh', 'mle' and 'se' are always printed.

   trans: An logical indicator for a non-stationary fit. 

   model: A list with components 'mul', 'sigl' and 'shl'. 

    link: A character vector giving inverse link functions. 

threshold: The threshold, or vector of thresholds. 

     npy: The number of observations per year/block. 

    nexc: The number of data points above the threshold. 

    data: The data that lie above the threshold. For non-stationary
          models, the data is standardized. 

    conv: The convergence code, taken from the list returned by
          'optim'. A zero indicates successful convergence. 

    nllh: The negative logarithm of the likelihood evaluated at the
          maximum likelihood estimates. 

    vals: A matrix with four columns containing the maximum likelihood
          estimates of the location, scale and shape parameters, and
          the threshold, at each data point. 

     gpd: A matrix with three rows containing the maximum likelihood
          estimates of corresponding GPD location, scale and shape
          parameters at each data point. 

     mle: A vector containing the maximum likelihood estimates. 

     cov: The covariance matrix. 

      se: A vector containing the standard errors. 


     For stationary models two plots are produced; a probability plot 
     and a quantile plot. For non-stationary models two plots are
     produced;  a residual probability plot and a residual quantile
     plot.

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

     Alec Stephenson for the code implemented from R's ismev package, 
      Stuart Scott for the original code, 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.

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

     'mrlPlot', 'gpdFit'.

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

     ## Use Rain Data:
        data(rain)
        
     ## Fit Point Process Model:
        xmpExtremes("Start: Parameter Fit for Point Process > ")
        fit = ppFit(x = rain[1:200], threshold = 10)
        print(fit) 
        
     ## Summarize Results:
        xmpExtremes("Next: Diagnostic Analysis > ")
        par(mfrow = c(2, 2), cex = 0.75)
        summary(fit)
        xmpExtremes("Next: Interactive Plot > ")
        
     ## Interactive Plot:
        ##> par(mfrow = c(2, 2), cex = 0.75)
        ##> plot(fit)

