polynom               package:RTisean               R Documentation

_M_o_d_e_l_i_n_g _d_a_t_a _t_r_o_u_g_h _a _p_o_l_y_n_o_m_i_a_l _a_n_s_a_t_z

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

     This programs models a time series making a polynomial ansatz.

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

     polynom(series, l, x = 0, c = 1, m = 2, d = 1, p = 2, n, L)

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

  series: a vector or a matrix. 

       l: number of data to use. 

       x: number of lines to be ignored. 

       c: column to be read. 

       m: embedding dimension. 

       d: delay. 

       p: order of the polynomial. 

       n: number of points for the fit.

       L: length of the predicted series. 

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

     The points following the first 'n' ones are used to estimate the
     out of sample error.

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

     a list composed by:

  coeff : the model coefficients

    err : the average insample error and average out of sample error,
          the latter if 'L' is set >0.

    pred: the predicted points, if 'L' is set >0.

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

     'polyback'

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

     ## Not run: 

     dat <- sin(1:10000)+rnorm(10000)/5
     polynomout <- polynom(dat, p = 3, L=100, n=9900)
     pred <- polynomout$pred
     plot(dat[9901:10000],t="l",xlab="Time",ylab="Sin data",ylim=c(-1.9,max(dat)))
     lines(pred,col=2)
     legend(70,-1.5, "Noisy Data",fill=1, bty="n")
     legend(70,-1.7,"Filtered Data",fill=2,bty="n")

     ## End(Not run)

