HeavisideFunction          package:fSeries          R Documentation

_H_a_v_i_s_i_d_e _a_n_d _R_e_l_a_t_e_d _F_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     A collection and description of functions  which compute the
     Heaviside and related  functions. These include the sign function,
      the delta function, the boxcar function,  and the ramp function. 

     The functions are:

       'H'       Computes Heaviside unit step function,
       'Sign'    Just another signum function,
       'Delta'   Computes delta function,
       'Boxcar'  Computes boxcar function,
       'Ramp'    Computes ramp function.

_U_s_a_g_e:

     H(x, a = 0)
     Sign(x, a = 0)
     Delta(x, a = 0)
     Boxcar(x, a = 0.5)
     Ramp(x, a = 0)

_A_r_g_u_m_e_n_t_s:

       a: a numeric value, the location of the break.


       x: a numeric vector. 

_D_e_t_a_i_l_s:

     The Heaviside step function 'H' is 1 for 'x>a',  '1/2' for 'x=a',
     and '0' for 'x<a'. 

     The Sign function 'Sign' is '1' for 'x>a',  '0' for 'x=a', and
     '-1' for 'x<a'. 

     The delta function 'Delta' is defined as:  'Delta(x) = d/dx
     H(x-a)'. 

     The boxcar function 'Boxcar' is defined as:  'Boxcar(x) = H(x+a) -
     H(x-a)'. 

     The ramp function is defined as:  'Ramp(x)= (x-a)*H(x-a)'.

_V_a_l_u_e:

     returns the function values of the selected function.

_N_o_t_e:

     The Heaviside function is used in the implementation of the skew
     Normal, Student-t, and Generalized Error distributions,
     distributions functions which play an important role in modelling
     GARCH processes.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz for the Rmetrics R-port.

_R_e_f_e_r_e_n_c_e_s:

     Weisstein W. (2004);
     _http://mathworld.wolfram.com/HeavisideStepFunction.html_,
     Mathworld.

_S_e_e _A_l_s_o:

     'GarchDistribution', 'GarchDistributionFits'.

_E_x_a_m_p_l_e_s:

     ## SOURCE("fSeries1.34B-HeavisideFunction")

     ## H -
        x = sort(round(c(-1, -0.5, 0, 0.5, 1, 5*rnorm(5)), 2))
        h = H(x)
             
     ## Sign -
        s = Sign(x)
        
     ## Delta -
        d = Delta(x)
        
     ## Boxcar -
        Pi = Boxcar(x)

     ## ramp - 
        r = Ramp(x)
        cbind(x = x, Step = h, Signum = s, Delta = d, Pi = Pi, R = r)                

