triangle                package:VGAM                R Documentation

_T_r_i_a_n_g_l_e _D_i_s_t_r_i_b_u_t_i_o_n _F_a_m_i_l_y _F_u_n_c_t_i_o_n

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

     Estimating the parameter of the triangle distribution by maximum
     likelihood estimation.

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

     triangle(lower=0, upper=1, link="elogit",
              earg=if(link=="elogit") list(min = lower, max = upper) else
              list(), itheta=NULL)

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

lower, upper: lower and upper limits of the distribution. Must be
          finite. Called A and B respectively below. 

    link: Parameter link function applied to the parameter theta, which
          lies in (A,B). See 'Links' for more choices. The default
          constrains the estimate to lie in the interval.

    earg: List. Extra argument for the link. See 'earg' in 'Links' for
          general information.

  itheta: Optional initial value for the parameter. The default is to
          compute the value internally.

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

     The triangle distribution has a probability density function that
     consists of two lines joined at theta. The lines intersect the y=0
     axis at A and B. Here, Fisher scoring is used.

     On fitting, the 'extra' slot has components called 'lower' and
     'upper' which contains the values of the above arguments (recycled
     to the right length). The fitted values are the mean of the
     distribution, which is a little messy to write.

_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'.

_N_o_t_e:

     The response must contain values in (A,B). For most data sets
     (especially small ones) it is very common for half-stepping to
     occur.

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

     T. W. Yee

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

     'Triangle'.

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

     y  = rtriangle(n <- 3000, theta=3/4)
     fit = vglm(y ~ 1, triangle(link="identity"), trace=TRUE)
     coef(fit, matrix=TRUE)
     Coef(fit)
     fit@extra$lower[1:5]

     fitted(fit)[1:5]
     mean(y)

