| Type: | Package | 
| Title: | Robust Maximum Likelihood Estimation for Spatial Error Model | 
| Version: | 0.1.1.1 | 
| Date: | 2025-07-20 | 
| Maintainer: | Vural Yildirim <vurall_yildirim@hotmail.com> | 
| Description: | Provides robust estimation for spatial error model to presence of outliers in the residuals. The classical estimation methods can be influenced by the presence of outliers in the data. We proposed a robust estimation approach based on the robustified likelihood equations for spatial error model (Vural Yildirim & Yeliz Mert Kantar (2020): Robust estimation approach for spatial error model, Journal of Statistical Computation and Simulation, <doi:10.1080/00949655.2020.1740223>). | 
| License: | GPL-3 | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.3.2 | 
| Depends: | R (≥ 2.10) | 
| NeedsCompilation: | no | 
| Author: | Vural Yildirim  | 
| Packaged: | 2025-07-20 17:58:52 UTC; Vural | 
| Repository: | CRAN | 
| Date/Publication: | 2025-07-20 18:10:02 UTC | 
Spatial Robust MLE Package
Description
Robust Maximum Likelihood Estimation for Spatial Error Model.
Author(s)
Vural Yildirim vurall_yildirim@hotmail.com
Yeliz Mert Kantar
References
Yildirim, V. and Kantar, Y.M. (2020). Robust estimation of spatial error model. in Journal of Statistical Computation and Simulation. doi:10.1080/00949655.2020.1740223
Initial coefficients of individual pension system data
Description
Initial coefficients of individual pension system data were obtained by MLE.
Usage
IPS_coefs
Format
A list with 10 values, which are:
- (Intercept)
 intercept
- Labor_Rate
 labor rate
- Unemployment_Rate
 unemployment rate
- Sex_Ratio
 sex ratio
- Urbanization_Rate
 urbanization rate
- Deposit_Rate
 deposit rate
- Illiteracy_Rate
 illiteracy rate
- HDI
 human development index
- lambda
 spatial autocorrelation parameter
- s2
 variance
The individual pension system data of Turkey
Description
This is individual pension system data of Turkey for analysing spatial error model.
Usage
IPS_data
Format
A list with 10 variables, which are:
- ID
 provinces ID
- Province
 provinces names
- RPIPS
 participant rate of individual pension system
- Labor_Rate
 labor rate
- Unemployment_Rate
 unemployment rate
- Sex_Ratio
 sex ratio
- Urbanization_Rate
 urbanization rate
- Deposit_Rate
 deposit rate
- Illiteracy_Rate
 illiteracy rate
- HDI
 human development index
Robust Maximum Likelihood Estimation for Spatial Error Model
Description
This package provides robust maximum likelihood estimation for spatial error model.
Usage
RoMLE.error(
  initial.beta,
  initial.s2,
  initial.lambda,
  W,
  y,
  x,
  phi.function,
  converge.v,
  iter,
  print.values
)
Arguments
initial.beta | 
 initial value of coefficients  | 
initial.s2 | 
 initial value of varaince  | 
initial.lambda | 
 initial value of autocorrelation parameters  | 
W | 
 a symmetric weight matrix  | 
y | 
 dependent variable  | 
x | 
 independent variables  | 
phi.function | 
 a robust m-estimator function, should be set as 1 for Cauchy, 2 for Welsch, 3 for Insha and 4 for Logistic  | 
converge.v | 
 converge value for fisher scoring algorithm, can be set as 1e-04  | 
iter | 
 iteration number for fisher scoring algorithm, set by users (e.g. 100)  | 
print.values | 
 printing estimated values for each step until converge, should be set TRUE or FALSE  | 
Value
coefficients, lambda, s2, Phi
References
Yildirim, V. and Kantar, Y.M. (2020). Robust estimation of spatial error model. in Journal of Statistical Computation and Simulation doi:10.1080/00949655.2020.1740223
Yildirim, V., Mert Kantar, Y. (2019). Spatial Statistical Analysis of Participants in The Individual Pension System of Turkey. Eskisehir Teknik Universitesi Bilim Ve Teknoloji Dergisi B - Teorik Bilimler, 7(2), 184-194 doi:10.20290/estubtdb.518706
Examples
#spdep library can be used to create a weight matrix from listw
#require(spdep)
#W <- as(listw, "CsparseMatrix")
#example 1
data(TRQWM)
data(unemployment_data)
data(unemployment_coefs)
y <- unemployment_data$unemployment
x <- unemployment_data$urbanization
#initial values was taken from MLE
initial.beta <- unemployment_coefs[1:2,2]
initial.lambda <- unemployment_coefs[3,2]
initial.s2 <- unemployment_coefs[4,2]
RoMLE.error(initial.beta, initial.s2, initial.lambda, W=TRQWM, y, x,
            phi.function=3, converge.v=0.0001, iter=100, print.values=TRUE)
#example 2
data(TRQWM)
data(IPS_data)
data(IPS_coefs)
y <- IPS_data[,3]
x <- IPS_data[,4:10]
#initial values was taken from MLE
initial.beta <- IPS_coefs[1:8,2]
initial.lambda <- IPS_coefs[9,2]
initial.s2 <- IPS_coefs[10,2]
RoMLE.error(initial.beta, initial.s2, initial.lambda, W=TRQWM, y, x,
            phi.function=3, converge.v=0.0001, iter=100, print.values=TRUE)
Queen weight matrix of Turkey
Description
This is queen continugity weight matrix of Turkey.
Usage
TRQWM
Format
A symmetric matrix with 81x81 values,
- V
 provinces ID
Initial coefficients of unemployment data
Description
Initial coefficients of unemployment data were obtained by MLE.
Usage
unemployment_coefs
Format
A list with 4 values, which are:
- (Intercept)
 intercept
- Unemployment_Rate
 unemployment rate
- lambda
 spatial autocorrelation parameter
- s2
 variance
Unemployment data of Turkey
Description
This is unemployment data of Turkey for analysing spatial error model.
Usage
unemployment_data
Format
A list with 4 variables, which are:
- ID
 provinces ID
- province
 provinces names
- unemployment
 unemployment rate
- urbanization
 urbanization rate