computeTruncatedNormalPdf    package:rotRPackage    R Documentation

_C_o_m_p_u_t_e _t_h_e _P_d_f _o_f _a _T_r_u_n_c_a_t_e_d_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:

     This ROT function, called from a Distribution C++ object, is given
     a point and the necessary distribution parameters. It then
     computes the Pdf at the point.

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

     computeTruncatedNormalPdf(point, mu, sigma, a, b)

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

   point: Point(s) where the Pdf is computed. (vector)

      mu: The TruncatedNormal distribution mu.

   sigma: The TruncatedNormal distribution sigma.

       a: The TruncatedNormal distribution aParameter.

       b: The TruncatedNormal distribution bParameter.

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

     The truncated normal distribution has the following density
     function: $$f(x, mu, sigma, a, b) = 1[a, b](x) * (1 / sigma) *
     phi((x - mu) / sigma) / (phi((b - mu) / sigma) - phi((a - mu) /
     sigma))$$

_V_a_l_u_e:

     The TruncatedNormal Pdf value (vector)

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

     Pierre-Matthieu Pair, Softia for EDF.

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

     # Standard TruncatedNormal distribution example. 

     point <- runif(1000) * 14 - 6
     plot(point, computeTruncatedNormalPdf(point, 1, 2, - 2, 6))

