data2cauchypoly           package:Lmoments           R Documentation

_E_s_t_i_m_a_t_i_o_n _o_f _t_h_e _C_a_u_c_h_y-_p_o_l_y_n_o_m_i_a_l _q_u_a_n_t_i_l_e _m_i_x_t_u_r_e

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

     Estimates the parameters of the Cauchy-polynomial quantile mixture
     from data or from trimmed L-moments

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

     data2cauchypoly4(data)
     t1lmom2cauchypoly4(t1lmom)

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

    data: vector

  t1lmom: vector of trimmed L-moments

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

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

     vector containing the four parameters of the Cauchy-polynomial
     quantile mixture

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

     Juha Karvanen juha.karvanen@ktl.fi

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

     Karvanen, J. 2005. Estimation of quantile mixtures via L-moments
     and trimmed L-moments,  _Computational Statistics & Data
     Analysis_, in press <URL:
     http://www.bsp.brain.riken.jp/publications/2005/karvanen_quantile_
     mixtures.pdf>.

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

     't1lmoments' for trimmed L-moments,  'dcauchypoly' for the
     Cauchy-polynomial quantile mixture and 'data2normpoly4' for the
     estimation of the normal-polynomial quantile mixture.

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

     #Generates 500 random variables from the Cauchy-polynomial quantile mixture, 
     #calculates the trimmed L-moments,
     #estimates parameters via trimmed L-moments and 
     #plots the true pdf and the estimated pdf together with the histogram of the data.
     true_params<-t1lmom2cauchypoly4(c(0,1,0.075,0.343));
     x<-rcauchypoly(500,true_params);
     t1lmom<-t1lmoments(x);
     estim_params<-t1lmom2cauchypoly4(t1lmom);
     plotpoints<-seq(-10,10,by=0.01);
     histpoints<-c(seq(min(x)-1,-20,length.out=50),seq(-10,10,by=0.5),seq(20,max(x)+1,length.out=50));
     hist(x,breaks=histpoints,freq=FALSE,xlim=c(-10,10));
     lines(plotpoints,dcauchypoly(plotpoints,estim_params),col='red');
     lines(plotpoints,dcauchypoly(plotpoints,true_params),col='blue');

