powl                  package:VGAM                  R Documentation

_P_o_w_e_r _L_i_n_k _F_u_n_c_t_i_o_n

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

     Computes the power transformation, including its inverse and the
     first two derivatives.

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

     powl(theta, earg = list(power=1), inverse = FALSE, deriv = 0,
           short = TRUE, tag = FALSE)

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

   theta: Numeric or character. See below for further details.

    earg: List. Extra argument for passing in additional information.
          Here, the component name 'power' denotes the power or
          exponent. This component name should not be abbreviated.

 inverse: Logical. If 'TRUE' the inverse function is computed.

   deriv: Order of the derivative. Integer with value 0, 1 or 2.

   short: Used for labelling the 'blurb' slot of a 'vglmff-class'
          object.

     tag: Used for labelling the linear/additive predictor in the
          'initialize' slot of a 'vglmff-class' object. Contains a
          little more information if 'TRUE'.

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

     The power link function raises a parameter by a certain value of
     'power'. Care is needed because it is very easy to get numerical
     problems, e.g., if 'power=0.5' and 'theta' is negative.

     The arguments 'short' and 'tag' are used only if 'theta' is
     character.

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

     For 'powl' with 'deriv = 0', then 'theta' raised to the power of
     'power'. And if 'inverse = TRUE' then 'theta' raised to the power
     of '1/power'.

     For 'deriv = 1', then the function returns _d_ 'theta' / _d_ 'eta'
     as a function of 'theta' if 'inverse = FALSE', else if 'inverse =
     TRUE' then it returns the reciprocal.

_N_o_t_e:

     Numerical problems may occur for certain combinations of 'theta'
     and 'power'. Consequently this link function should be used with
     caution.

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

     Thomas W. Yee

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

     'Links', 'loge'.

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

     powl("a", earg=list(power=2), short=FALSE, tag=TRUE)

     x = 1:5
     powl(x)
     powl(x, earg=list(power=2))

     earg=list(power=2)
     max(abs(powl(powl(x, earg=earg), earg=earg, inverse=TRUE) - x)) # Should be 0

     x = (-5):5
     powl(x, earg=list(power=0.5))  # Has NAs

     # 1/2 = 0.5
     y = rbeta(n=1000, shape1=2^2, shape2=3^2)
     fit = vglm(y ~ 1, betaff(link="powl", earg=list(power=0.5), i1=3, i2=7),
                trace=TRUE, cri="coef")
     coef(fit, matrix=TRUE)
     Coef(fit)  # Useful for intercept-only models
     vcov(fit, untrans=TRUE)

