xvalid                 package:geoR                 R Documentation

_C_r_o_s_s-_v_a_l_i_d_a_t_i_o_n _u_s_i_n_g _k_r_i_g_i_n_g

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

     This is a function to perform model validation. Options include
     leaving-one-out cross-validation where. each data location is
     removed from the data set and the variable at this location is
     predicted using the remaining locations, for as given model. This
     can be done for all or some of the locations. Alternativelly,
     other validation locations which are not the same as the original
     data locations can be used.

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

     xvalid(geodata, coords = geodata$coords, data = geodata$data,
            model, reestimate = FALSE, variog.obj = NULL,
            output.reestimate = FALSE, locations.xvalid = "all",
            data.xvalid = NULL, messages.screen = TRUE, ...)

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

     The cross-validation uses the function `krige.conv' to predict at
     each location.

     For models fitted by `variofit' the parameters kappa, psiA, psiR
     and lambda are always regarded as fixed.

     See documentation of the function `likfit' for more details on the
     model and its parameters.

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

     An object of the `class' `"xvalid"' which is a list with the
     following components: 

    data: the original data.  

predicted: the values predicted by cross-validation.  

krige.var: the cross-validation prediction variance.  

   error: difference `data - predicted'.   

std.error: the errors divided by the square root of the prediction
          variances.  

    prob: the cumulative probability at original value under a normal
          distribution with parameters given by the cross-validation
          results.  


     If `reestimate = TRUE' and `output = TRUE' additional columns are
     added to the data-frame. Each column will contain the values of
     the re-estimated parameters.

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

     Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br, 
     Peter J. Diggle p.diggle@lancaster.ac.uk.

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

     Further information about geoR can be found at:
     <URL: http://www.maths.lancs.ac.uk/~ribeiro/geoR.html>.

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

     `plot.xvalid' for plotting of the results, `likfit', `variofit'
     for parameter estimation and `krige.conv' for the kriging method
     used for predictions.

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

     if(is.R()) data(s100)
     #
     # Maximum likelihood estimation
     #
     s100.ml <- likfit(s100, ini = c(.5, .5), fix.nug = TRUE)
     #
     # Weighted least squares estimation
     #
     s100.var <- variog(s100, max.dist = 1)
     s100.wls <- variofit(s100.var, ini = c(.5, .5), fix.nug = TRUE)
     #
     # Now, performing cross-validation
     #
     s100.xv.ml <- xvalid(s100, model = s100.ml)
     s100.xv.wls <- xvalid(s100, model = s100.wls)

