model_spatial runs spatial row and column model based on the SpATS package

model_spatial(data, variable)

Arguments

data

The data frame on which the model is run. It should come from format_data_PPBstats.data_agro

variable

variable to analyse

Value

The function returns a list with two elements :

  • info : a list with variable

  • model :

    • model: the output from SpATS function

    • summary: summary of the model

    • df_residuals: effective degree of freedom of the residuals

    • MSerror: Mean Square error

Details

The model is run with the SpATS function of package SpATS. See ?SpATS for more information.

More information can be found in the book here.

See also