polyback               package:RTisean               R Documentation

_B_a_c_k_w_a_r_d _e_l_i_m_i_n_a_t_i_o_n _f_o_r _a _g_i_v_e_n _p_o_l_y_n_o_m_i_a_l

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

     Performs a backward elimination for a given polynomial, whose
     terms are  read from a parameter matrix. The terms are removed in
     such a way that the one step  forecast error is increased
     minimally.

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

     polyback(series, l, x = 0, c = 1, m = 2, d = 1, n, s = 1, scale = 1, p)

_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. 

       n: length for the insample error estimation.

       s: steps to be forecasted. 

   scale: final number of terms.

       p: name of the input matrix created with 'polypar' or by hand.

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

     A dataframe containing the  number of remaining terms in the
     polynomial in column 1, the in-sample error produced by the
     reduced polynomial in  column 2, the out-of-sample error produced
     by the reduced polynomial in column 3 and the term removed last
     from the polynomial in columns 4 and 5.

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

     'polypar'

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

     ## Not run: 
      
     polymat <- polypar(p=4)
     polyout <- polyback(sunspot.month,p=polymat,n=2000)
     plot(0:14,polyout[,2],t="l",ylim=range(polyout[,(2:3)]),
     xlab="Number of removed parameters",ylab="Forecast error",
     main="Fitting accuracy of polynomial
     model reduced via backward elimination")
     lines(0:14,polyout[,3],col=2)
     legend(2,0.5, c("In-sample error","Out-of-sample error"),fill=c(1,2),bty="n",cex=0.8)

     ## End(Not run)

