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)                

