SCSR_InfoCrit {SCDA} | R Documentation |
Automatically select the optimal number of clusters based on likelihood information criteria (i.e., AIC, BIC and HQC) for a given SCSR model.
Description
Computes the likelihood-based information criteria (i.e, Akaike's IC, Bayesian IC, and Hannan–Quinn IC) for every SCSR model given by the combination of the G and Phi contained in the G.set
and Phi.set
inputs and provides the associated likelihood-based information criteria.
Given the minimization rule, SCSR_InfoCrit
automatically identifies the optimal number of clusters for every criterion.
Usage
SCSR_InfoCrit(
Formula,
Data_sf,
listW,
Phi.set = c(0.5, 1),
G.set = c(2, 3, 4),
Type = c("SCLM", "SCSAR", "SCSEM", "SCSLX"),
CenterVars = TRUE,
ScaleVars = TRUE,
Maxitr = 200,
RelTol = 10^-6,
AbsTol = 10^-5,
Verbose = TRUE,
Seed = 123456789
)
Arguments
Formula |
a symbolic description of the regression model to be fit. The details of model specification are given for |
Data_sf |
A |
listW |
|
Phi.set |
Non-negative (>=0) real-valued vector. Sequence of spatial penalty parameter. Default is |
G.set |
Integer vector. Sequence of clusters to be considered. Default is |
Type |
Character. Declares which model specification has to be estimated. Admitted strings are:
|
CenterVars |
|
ScaleVars |
|
Maxitr |
Integer value. Maximum number of iterations for the iterative algorithm. Convergence criterion is fixed to |
RelTol |
Tolerance for the relative improvement in the log-likelihood (exit criterion) from iteration k to k+1. Default is |
AbsTol |
Tolerance for the absolute improvement in the log-likelihood (exit criterion) from iteration k to k+1. Default is |
Verbose |
|
Seed |
Integer value. Define the random number generator (RNG) state for random number generation in R.
Deafult is |
Details
Given the vectors G.set = c(2,3,4) and Phi.set = c(0.50,1), the function 'SCSR_InfoCrit' will compute 3x2=6 models, each at a given combination of G and Phi. For computional details on the spatially-clustered models, we kindly refer to Cerqueti, R., Maranzano, P. & Mattera, R. "Spatially-clustered spatial autoregressive models with application to agricultural market concentration in Europe". arXiv preprints (<doi:10.48550/arXiv.2407.15874>)
Value
A list object containing the following outputs:
IC: a
data.frame
object containing one row for each combination of the supplied vectors G.set and Phi.set and 5 columns (G,Phi,AIC,BIC,HQC).OptimPars: a
data.frame
object with 3 rows (criteria) and 2 columns (Parameters) with the optimal combination of G and Phi for every criterion.
Author(s)
Paolo Maranzano <>
Raffaele Mattera <>
Examples
data(Data_RC_PM_RM_JABES2024, package="SCDA")
SCSAR_IC <- SCSR_InfoCrit(Formula = "Gini_SO ~ GDPPC_PPS2020 + Share_AgroEmp",
Data_sf = Data2020, listW=listW, Type="SCSAR",
Maxitr = 100, Phi.set = c(0.50,1), G.set=c(2,3))