residualStats              package:dse1              R Documentation

_C_a_l_c_u_l_a_t_e _R_e_s_i_d_u_a_l_s _S_t_a_t_i_s_t_i_c_s _a_n_d _L_i_k_e_l_i_h_o_o_d

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

     Calculate the residuals statistics and likelihood of a residual.

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

         residualStats(pred, data, sampleT=nrow(pred), warn=TRUE)

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

    pred: A matrix with columns representing time series.

    data: A matrix with columns representing time series.

 sampleT: An integer indicating the sample to use.

    warn: If FALSE certain warnings are suppressed.

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

     Residuals are calculated as pred[1:sampleT,,drop=FALSE] -
     data[1:sampleT,,drop=FALSE] and then statistics are calculated
     based on these residuals. If pred or data are NULL they are
     treated as zero.

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

     A list with elements like, cov, pred, and sampleT. pred and
     sampleT are as supplied (and are returned as this is a utility
     function called by other functions and it is convenient to pass
     them along). cov is the covariance of the residual and like is a
     vector of four elements  representing the total, constant,
     determinant and covariance  terms of the negative log likelihood
     function.

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

     'l'

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

         residualStats(matrix(rnorm(200), 100,2), NULL) # but typically used for a residual

