plot-lines-methods           package:ghyp           R Documentation

_P_l_o_t _u_n_i_v_a_r_i_a_t_e _g_e_n_e_r_a_l_i_z_e_d _h_y_p_e_r_b_o_l_i_c _d_e_n_s_i_t_i_e_s

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

     These functions plot probability densities of generalized
     hyperbolic distribution objects.

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

     ## S4 method for signature 'ghyp, missing':
     plot(x, range = qghyp(c(0.001, 0.999), x), length = 1000, ...)
     ## S4 method for signature 'ghyp':
     lines(x, range = qghyp(c(0.001, 0.999), x), length = 1000, ...)

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

       x: An univariate 'ghyp' object.

   range: The range where the density will be computed. The default is
          the range from the 0.1 % quantile to the 99.9 % quantile.
          When 'range' has a length greater than 2 it is assumed to be
          the vector of quantiles and the density is computed on
          'range'.

  length: The desired length of the density vector.

     ...: Arguments passed to 'plot' and 'lines' respectively.

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

     When the density is very skewed, the computation of the quantile
     may fail. See 'qghyp' for details.

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

     David Lthi

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

     'hist', 'qqghyp', 'pairs', 'plot', 'lines'.

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

       data(smi.stocks)

       smi.fit   <-  fit.tuv(data = smi.stocks[,"SMI"], symmetric = TRUE)
       nestle.fit <- fit.tuv(data = smi.stocks[,"Nestle"], symmetric = TRUE)

       ## Student-t distribution
       plot(smi.fit, type = "l", log = "y")
       lines(nestle.fit, col = "blue")  
       
       ## Empirical 
       lines(density(smi.stocks[,"SMI"]), lty = "dashed")
       lines(density(smi.stocks[,"Nestle"]), lty = "dashed", col = "blue")  

