vonmises                package:VGAM                R Documentation

_v_o_n _M_i_s_e_s _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 location and scale parameters of the von Mises
     distribution by maximum likelihood estimation.

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

     vonmises(llocation="elogit", lscale="loge",
           elocation=if(llocation=="elogit") list(min=0, max=2*pi) else list(),
           escale=list(),
           ilocation=NULL, iscale=NULL,
           method.init=1, zero=NULL)

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

llocation, lscale: Parameter link functions applied to the location a
          parameter and scale parameter k, respectively. See 'Links'
          for more choices. For k, a log link is the default because
          the parameter is positive.

elocation, escale: List. Extra argument for each of the link functions.
          See 'earg' in 'Links' for general information.

ilocation: Initial value for the location a parameter. By default, an
          initial value is chosen internally using 'method.init'.
          Assigning a value will override the argument 'method.init'.

  iscale: Initial value for the scale k parameter. By default, an
          initial value is chosen internally using 'method.init'.
          Assigning a value will override the argument 'method.init'.

method.init: An integer with value '1' or '2' which specifies the
          initialization method. If failure to converge occurs try the
          other value, or else specify a value for  'ilocation' and
          'iscale'.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only. The default is
          none of them. If used, choose one value from the set {1,2}.

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

     The (two-parameter) von Mises distribution  has a density that can
     be written as

              f(y;a,k) = exp[k*cos(y-a)] / (2*pi*I0(k))

     where 0 <= y < 2*pi, k>0 is the scale parameter, a is the location
     parameter, and  I0(k) is the modified Bessel function of order 0
     evaluated at k. The mean of Y (which is the fitted value) is a and
     the circular variance is 1 - I1(k) / I0(k) where I1(k) is the
     modified Bessel function of order 1. By default,
     eta1=log(a/(2*pi-a)) and eta2=log(k) for this family function.

_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:

     Numerically, the von~Mises can be difficult to fit because of a
     log-likelihood having multiple maxima. The user is therefore
     encouraged to try different starting values, i.e., make use of
     'ilocation' and 'iscale'.

_N_o_t_e:

     The response and the fitted values are scaled so that  0<=y<2*pi.
     The linear/additive predictors are left alone. Fisher scoring is
     used.

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

     T. W. Yee

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

     Evans, M., Hastings, N. and Peacock, B. (2000) _Statistical
     Distributions_, New York: Wiley-Interscience, Third edition.

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

     'Bessel'.

     'CircStats' and 'circular' currently have a lot more R functions
     for circular data than the 'VGAM' package.

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

     x = runif(n <- 1000)
     y = rnorm(n, m=2+x, sd=exp(0.2))   # Not von Mises data!!
     fit = vglm(y  ~ x, vonmises(zero=2), trace=TRUE)
     coef(fit, matrix=TRUE)
     Coef(fit)
     range(y)       # original data
     range(fit@y)   # processed data is in [0,2*pi)

