a2c                package:smoothSurv                R Documentation

_W_o_r_k _F_u_n_c_t_i_o_n _f_o_r '_s_m_o_o_t_h_S_u_r_v_R_e_g'

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

     Compute the 'c' G-spline coefficients from 'a' G-spline
     coefficients.

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

     a2c(acoef)

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

   acoef: A vector of 'a' G-spline coefficients. 

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

     'c' and 'a' G-spline coefficients are related by the expression

    c[j] = exp(a[j])/[exp(a[1]) + ... + exp(a[g])], j = 1, ..., g,

     where a[k] = 0, k = 'which.zero'. This function transforms the 'c'
     coefficients into their 'a' counterparts.

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

     A vector of same length as 'acoef' with 'c' G-spline coefficients.

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

     Arno&#353t Kom&#225rek komarek@karlin.mff.cuni.cz

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

     'c2a'

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

     ccoef <- c(0.1, 0.2, 0.15, 0.3, 0.25)

     ### Compute 'a' counterparts
     acoef <- c2a(ccoef, 1)
     print(acoef)

     ### And back 'c', ccoef2 should be same as ccoef
     ccoef2 <- a2c(acoef)
     print(ccoef2)

