Learn R Programming

SCDA (version 0.0.1)

SpatReg_Perf: Computes a set of in-sample performance metrics (i.e., AIC, BIC, RMSE, Sigma, and Pseudo R\(^2\)) for a given spatial regression model of class lm or Sarlm.

Description

Computes a set of in-sample performance metrics (i.e., AIC, BIC, RMSE, Sigma, and Pseudo R$^2$) for a given spatial regression model of class lm or Sarlm as defined in package spatialreg. The function can be applied to the output of any SCSR model and contained in the ClusterFitModels output of SCSR_Estim function.

Usage

SpatReg_Perf(SRModel)

Value

A named vector containing numerical values for the estimated performance metrics (i.e., AIC, BIC, RMSE, Sigma, and Pseudo R\(^2\)) for the input model in SRModel.

Arguments

SRModel

Estimated spatial or non-spatial regression model of class lm or Sarlm (see package spatialreg for details.)

Examples

Run this code
data(Data_RC_PM_RM_JABES2024, package="SCDA")
SCSAR <- SCSR_Estim(Formula = "Gini_SO ~ GDPPC_PPS2020 + Share_AgroEmp",
                    Data_sf = Data2020, G=3, listW=listW, Type="SCSAR", Phi = 0.50)
SpatReg_Perf(SRModel = SCSAR$ClusterFitModels[[1]])
SpatReg_Perf(SRModel = SCSAR$ClusterFitModels[[2]])
SpatReg_Perf(SRModel = SCSAR$ClusterFitModels[[3]])

Run the code above in your browser using DataLab