fixConstants              package:dse1              R Documentation

_F_i_x _T_S_m_o_d_e_l _C_o_e_f_f_i_c_i_e_n_t_s (_P_a_r_a_m_e_t_e_r_s) _t_o _C_o_n_s_t_a_n_t_s

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

     Fix any coefficients within fuzz of 0.0 or 1.0 to exactly 0.0 or
     1.0. This will not change the model much but will affect some
     estimation  techniques and information criteria results, as these
     are considered to  be constants rather than coefficients.

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

         fixConstants(model, fuzz=1e-5, constants=NULL)

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

   model: an object of class TSmodel.

    fuzz: absolute difference to be considered equivalent.

constants: NULL or a list of logical arrays.

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

     If constants is not NULL then parameters within fuzz of 0.0 or 1.0
     set  as constants 0.0 or 1.0. If constants is not NULL then it
     should be a list  with logical arrays named F, G ..., with TRUE
     corresponding to any  array elements which are to  be treated as
     constant.

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

     An object of class 'SS' 'TSmodel' with some array entries set to
     constants 0.0 or 1.0.

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

     'fixF'

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

         f <- array(c(.5,.3,.2,.4),c(2,2))
         h <- array(c(1,0,0,1),c(2,2))
         k <- array(c(.5,.3,.2,.4),c(2,2))
         ss <- SS(F=f,G=NULL,H=h,K=k)
         ss
         coef(ss)
         ss <- fixConstants(ss, constants=list(
                   F = matrix(c(TRUE, FALSE, FALSE, FALSE), 2,2)))
         ss
         coef(ss)
         if(is.R()) data("eg1.DSE.data.diff", package="dse1")
         model <- toARMA(toSS(estVARXls(eg1.DSE.data.diff)))
         model <- fixConstants(model)

