llbb7           package:mlCopulaSelection           R Documentation

_B_B_7'_s _l_o_g-_l_i_k_e_l_i_h_o_o_d _f_u_n_c_t_i_o_n

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

     Calculate the log-likelihood for the BB7 density.

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

     llbb7(param, u, v)

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

   param: bidimensional vector with parameters c('theta','delta')
          (1<'theta' and 0<'delta') 

       u: vector with the first coordenate of the bivariate data 

       v: vector with the second coordenate of the bivariate data (same
          size as'u')  

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

     (u,v) margins must have Uniform(0,1) marginal distribution

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

     BB7's log-likelihood function for the sample

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

     Jesus Garcia, IMECC-UNICAMP and  Veronica Gonzalez-Lopez,
     IMECC-UNICAMP

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

     Joe, H., (1997). Multivariate Models and Dependence Concepts. 
     Monogra. Stat. Appl. Probab. 73, London: Chapman and Hall.

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

     # The data:
     u <- c( 0.43, 0.1, 0.2, 0.33, 0.24, 0.29, 0.14, 0.4, 0.39, 0.8, 0.63, 0.16, 0.24, 0.14,0.71, 0.39, 0.48, 0.29, 0.38, 0.37)
     v <- c(0.01, 0.26, 0.2, 0.36, 0.34, 0.43, 0.27, 0.61, 0.08, 0.25, 0.72, 0.15, 0.14, 0.12, 0.74, 0.18, 0.58, 0.15, 0.34, 0.13)
     # The log-likelihood 
     r<-llbb7(c(1.5,1.5),u,v)

     ## The function is currently defined as
     function(param,u,v)
     {
     n<-sum(u>=-1)
     s<-0.
     for(i in 1:n) { s<-s+log(dcbb7(param[1],param[2],u[i],v[i]));if(is.nan(s)) {break};  }
     if(is.finite(s)) {res<-s} else {res<- -10**(64)}
       }

