cgumbel                 package:VGAM                 R Documentation

_C_e_n_s_o_r_e_d _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:

     Maximum likelihood estimation of the 2-parameter Gumbel
     distribution when there are censored observations. A matrix
     response is not allowed.

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

     cgumbel(llocation="identity", lscale = "loge",
             elocation = list(), escale = list(), iscale=NULL,
             mean=TRUE, percentiles=NULL, zero=2)

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

llocation, lscale: Character. Parameter link functions for the location
          and (positive) scale parameters. See 'Links' for more
          choices.

elocation, escale: Extra argument for the respective links. See 'earg'
          in 'Links' for general information.

  iscale: Numeric and positive.  Initial value for scale. Recycled to
          the appropriate length. In general, a larger value is better
          than a smaller value. The default is to choose the value
          internally.

    mean: Logical. Return the mean? If 'TRUE' then the mean is
          returned, otherwise percentiles given by the 'percentiles'
          argument.

percentiles: Numeric with values between 0 and 100. If 'mean=FALSE'
          then the fitted values are percentiles which must be
          specified by this argument.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only.  The value
          (possibly values) must be from the set {1,2} corresponding
          respectively to location and scale.  If 'zero=NULL' then all
          linear/additive predictors are modelled as a linear
          combination of the explanatory variables. The default is to
          fit the shape parameter as an intercept only.

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

     This 'VGAM' family function is like 'gumbel' but handles
     observations that are left-censored (so that the true value would
     be less than the observed value) else right-censored (so that the
     true value would be greater than the observed value). To indicate
     which type of censoring, input 'extra = list(leftcensored = vec1,
     rightcensored = vec2)' where 'vec1' and 'vec2' are logical vectors
     the same length as the response. If the two components of this
     list are missing then the logical values are taken to be 'FALSE'. 
     The fitted object has these two components stored in the 'extra'
     slot.

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

     An object of class '"vglmff"' (see 'vglmff-class'). The object is
     used by modelling functions such as 'vglm' and 'vgam'.

_W_a_r_n_i_n_g:

     Numerical problems may occur if the amount of censoring is
     excessive.

_N_o_t_e:

     See 'gumbel' for details about the Gumbel distribution. The
     initial values are based on assuming all uncensored observations,
     therefore could be improved upon.

_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', 'rgumbel', 'guplot', 'gev', 'venice'.

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

     # Example 1
     data(venice)
     ystar = venice[["r1"]]  # Use the first order statistic as the response
     n = length(ystar)
     L = runif(n, 100, 104) # Lower censoring points
     U = runif(n, 130, 135) # Upper censoring points
     y = pmax(L, ystar) # Left  censored
     y = pmin(U, y)     # Right censored
     extra = list(leftcensored = ystar < L, rightcensored = ystar > U)
     fit = vglm(y ~ scale(year), data=venice, trace=TRUE, extra=extra,
                cgumbel(mean=FALSE, perc=c(5,25,50,75,95)))
     coef(fit, matrix=TRUE)
     fitted(fit)[1:5,]
     fit@extra

     # Example 2: simulated data
     n = 1000
     ystar = rgumbel(n, loc=1, scale=exp(0.5)) # The uncensored data
     L = runif(n, -1, 1) # Lower censoring points
     U = runif(n,  2, 5) # Upper censoring points
     y = pmax(L, ystar) # Left  censored
     y = pmin(U, y)     # Right censored
     ## Not run: par(mfrow=c(1,2)); hist(ystar); hist(y);
     extra = list(leftcensored = ystar < L, rightcensored = ystar > U)
     fit = vglm(y ~ 1, trace=TRUE, extra=extra, cgumbel)
     coef(fit, matrix=TRUE)

