leipnik                 package:VGAM                 R Documentation

_L_e_i_p_n_i_k _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:

     Estimates the two parameters of a (transformed) Leipnik
     distribution by maximum likelihood estimation.

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

     leipnik(lmu = "logit", llambda = "loge", imu = NULL, ilambda = NULL)

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

lmu, llambda: Link function for the mu and lambda parameters. See
          'Links' for more choices.

imu, ilambda: Numeric. Optional initial values for mu and lambda.

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

     The (transformed) Leipnik distribution has density function

 f(y;mu,lambda) =  (y(1-y))^(-1/2) * (1 + (y-mu)^2 / (y*(1-y)))^(-lambda/2) /  Beta((lambda+1)/2, 1/2)

     where 0 < y < 1 and lambda > -1. The mean is mu (returned as the
     fitted values) and the variance is 1/lambda.

     Jorgensen (1997) calls the above the *transformed* Leipnik
     distribution, and if y = (x+1)/2 and mu = (theta+1)/2, then the
     distribution of X as a function of x and theta is known as the the
     (untransformed) Leipnik distribution.  Here, both x and theta are
     in (-1,1).

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

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

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

     If 'llambda="identity"' then it is possible that the 'lambda'
     estimate becomes less than -1, i.e., out of bounds. One way to
     stop this is to choose 'llambda="loge"', however, 'lambda' is then
     constrained to be positive.

_N_o_t_e:

     Convergence may be slow or fail. Until better initial value
     estimates are forthcoming try assigning the argument 'ilambda'
     some numerical value if it fails to converge. Currently,
     Newton-Raphson is implemented, not Fisher scoring. Currently, this
     family function probably only really works for intercept-only
     models, i.e., 'y ~ 1' in the formula.

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

     T. W. Yee

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

     Jorgensen, B. (1997) _The Theory of Dispersion Models_. London:
     Chapman & Hall

     Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1995)
     _Continuous Univariate Distributions_, 2nd edition, Volume 2, New
     York: Wiley. (pages 612-617).

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

     'mccullagh89'.

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

     y = rnorm(n=2000, mean=0.5, sd=0.1)  # Not good data
     fit = vglm(y ~ 1, leipnik(ilambda=1), tr=TRUE, checkwz=FALSE)
     fit = vglm(y ~ 1, leipnik(ilambda=1), tr=TRUE, cri="c", checkwz=FALSE)

     fitted(fit)[1:5]
     mean(y)
     summary(fit)
     coef(fit, matrix=TRUE)
     Coef(fit)

     sum(weights(fit))  # sum of the prior weights
     sum(weights(fit, type="w")) # sum of the working weights

