lognormal                package:VGAM                R Documentation

_L_o_g_n_o_r_m_a_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 (univariate) lognormal
     distribution.

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

     lognormal(lmeanlog = "identity", lsdlog = "loge", zero = NULL)
     lognormal3(lmeanlog = "identity", lsdlog = "loge",
                powers.try = (-3):3, delta = NULL, zero = NULL)

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

lmeanlog, lsdlog: Parameter link functions applied to the mean and
          (positive) sigma (standard deviation) parameter. Both of
          these are on the log scale.  See 'Links' for more choices.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only. For
          'lognormal()', the values must be from the set {1,2} which
          correspond to 'mu', 'sigma', respectively. For
          'lognormal3()', the values must be from the set {1,2,3} where
          3 is for lambda.

powers.try: Numerical vector. The initial lambda is chosen as the best
          value from 'min(y) - 10^powers.try' where 'y' is the
          response.

   delta: Numerical vector. An alternative method for obtaining an
          initial lambda. Here, 'delta = min(y)-lambda'. If given, this
          supersedes the 'powers.try' argument. The value must be
          positive.

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

     A random variable Y has a 2-parameter lognormal distribution if
     log(Y) is distributed N(mu, sigma^2). The expected value of Y,
     which is 

                     E(Y) = exp(mu + 0.5 sigma^2)

     and not mu, make up the fitted values.

     A random variable Y has a 3-parameter lognormal distribution if
     log(Y-lambda) is distributed N(mu, sigma^2). Here, lambda < Y. The
     expected value of Y, which is

                E(Y) =  lambda + exp(mu + 0.5 sigma^2)

     and not mu, make up the fitted values.

     'lognormal()' and 'lognormal3()' fit the 2- and 3-parameter
     lognormal distribution respectively. Clearly, if the location
     parameter lambda=0 then both distributions coincide.

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

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

     T. W. Yee

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

     Kleiber, C. and Kotz, S. (2003) _Statistical Size Distributions in
     Economics and Actuarial Sciences_, Hoboken, NJ:
     Wiley-Interscience.

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

     'rlnorm', 'normal1'.

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

     y = rlnorm(n <- 1000, meanlog=1.5, sdlog=exp(-0.8))
     fit = vglm(y ~ 1, lognormal, trace=TRUE)
     coef(fit, mat=TRUE)
     Coef(fit)

     x = runif(n <- 1000)
     y = rlnorm(n, mean=0.5, sd=exp(x))
     fit = vglm(y ~ x, lognormal(zero=1), trace=TRUE, crit="c")
     coef(fit, mat=TRUE)
     Coef(fit)

     n = 1000
     lambda = 4
     y = lambda + rlnorm(n, mean=1.5, sd=exp(-0.8))
     fit = vglm(y ~ 1, lognormal3, trace=TRUE)
     fit = vglm(y ~ 1, lognormal3, trace=TRUE, crit="c")
     coef(fit, mat=TRUE)
     Coef(fit)
     summary(fit)

