Title: | Robust Estimation for Seemingly Unrelated Regression Models |
---|---|
Description: | Data sets are often corrupted by outliers. When data are multivariate outliers can be classified as case-wise or cell-wise. The latters are particularly challenge to handle. We implement a robust estimation procedure for Seemingly Unrelated Regression Models which is able to cope well with both type of outliers. Giovanni Saraceno, Fatemah Alqallaf, Claudio Agostinelli (2021) <arXiv:2107.00975>. |
Authors: | Claudio Agostinelli [aut, cre]
|
Maintainer: | Claudio Agostinelli <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0-7 |
Built: | 2025-01-15 04:25:08 UTC |
Source: | https://github.com/cran/robustsur |
Computes eigenvalues and eigenvectors of the kronecker product of a matrix with an identity matrix.
eigenkronecker(x, n)
eigenkronecker(x, n)
x |
a numeric or complex symmetric matrix whose spectral decomposition is to be computed. Logical matrices are coerced to numeric. |
n |
dimension of the identity matrix. |
Only symmetric matrices are considered.
The spectral decomposition of kronecher product between x
and
an identity matrix of dimesion n
is returned as a list with
components
values |
a vector containing the eigenvalues. |
vectors |
a matrix whose columns contain the eigenvectors. |
Claudio Agostinelli and Giovanni Saraceno
R.A. Horn and C.R. Johnson (1994) Topics in Matrix Analysis, Cambridge University Press. Theorem 4.2.12.
eigenkronecker(x=cbind(c(1,-1), c(-1,1)), n=2)
eigenkronecker(x=cbind(c(1,-1), c(-1,1)), n=2)
These functions create and print summary results of the estimated equation system.
## S3 method for class 'surerob' summary(object, residCov=TRUE, equations=TRUE, ...) ## S3 method for class 'summary.surerob' print(x, digits=max(3, getOption("digits")-1), residCov=x$printResidCov, equations=x$printEquations, ...)
## S3 method for class 'surerob' summary(object, residCov=TRUE, equations=TRUE, ...) ## S3 method for class 'summary.surerob' print(x, digits=max(3, getOption("digits")-1), residCov=x$printResidCov, equations=x$printEquations, ...)
object |
an object of class |
x |
an object of class |
residCov |
logical. If |
equations |
logical. If |
digits |
number of digits to print. |
... |
not yet used. |
Applying summary
on an object of class surerob
returns a list of class summary.surerob
.
An object of class summary.surerob
contains all results that belong to the whole system.
This list contains one special object: eq
.
This is a list and contains objects of class
summary.lmrob
.
These objects contain the results that belong to each of the estimated equations.
The objects of classes summary.surerob
have the following components
method |
estimation method. |
residuals |
residuals. |
residCovEst |
residual covariance matrix used for estimation. |
residCov |
estimated residual covariance matrix. |
residCor |
correlation matrix of the residuals. |
detResidCov |
determinant of |
rweights |
matrix of robust weights. |
eq |
a list containing the summary from function
|
df |
degrees of freedom, a 2-vector, where the first element is the number of coefficients and the second element is the number of observations minus the number of coefficients. |
coefficients |
a matrix with columns for the estimated coefficients, their standard errors, t-statistic and corresponding (two-sided) p-values. |
ssr_weighted |
weighted residual sum of squares. |
r.squared |
|
adj.r.squared |
adjusted |
coefCov |
estimated covariance matrix of the coefficients. |
printResidCov |
argument |
printEquations |
argument |
control |
list of control parameters used for the estimation. |
call |
the matched call of |
Claudio Agostinelli and Giovanni Saraceno
Giovanni Saraceno, Fatemah Alqallaf and Claudio Agostinelli (2021?) A Robust Seemingly Unrelated Regressions For Row-Wise And Cell-Wise Contamination, submitted
library(systemfit) data("Kmenta") eqDemand <- consump~price+income eqSupply <- consump~price+farmPrice+trend system <- list(demand=eqDemand, supply=eqSupply) ## Robust estimation fitrob <- surerob(system, data=Kmenta) summary(fitrob)
library(systemfit) data("Kmenta") eqDemand <- consump~price+income eqSupply <- consump~price+farmPrice+trend system <- list(demand=eqDemand, supply=eqSupply) ## Robust estimation fitrob <- surerob(system, data=Kmenta) summary(fitrob)
Robust estimation for Seemingly Unrelated Regression Models in presence of cell-wise and case-wise outliers performed using a three-stage procedure. In the first step estimation of the coefficients in each single-equation model is obtained using a Robust Regression procedure, robust estimation of the residual covariance is obtained by a Two-Step Generalized S-estimator, a weighted least square is performed on the whole system to get final estimates of the regression coefficients.
surerob(formula, data, control=lmrob.control(), ...) ## S3 method for class 'surerob' print(x, digits=max(3, getOption("digits")-1), ...)
surerob(formula, data, control=lmrob.control(), ...) ## S3 method for class 'surerob' print(x, digits=max(3, getOption("digits")-1), ...)
formula |
a list of objects of class |
data |
a list of objects of class |
control |
list of control parameters. The default is constructed
by the function |
... |
arguments passed to the function
|
x |
an object of class |
digits |
number of digits to print. |
The estimation of systems of equations with unequal numbers of observations is not implemented.
surerob
returns a list of the class surerob
and
contains all results that belong to the whole system.
This list contains one special object: "eq". It is a list and contains
one object for each estimated equation. These objects are of the class
lmrob
and contain the results that belong only to the
regarding equation.
The objects of the class surerob
have the following components:
eq |
a list that contains the results that belong to the individual equations. |
call |
the matched call. |
method |
estimation method. |
rank |
total number of linear independent coefficients. |
coefficients |
vector of all estimated coefficients. |
fitted.values |
matrix of fitted values. |
residuals |
matrix of residuals |
imp.residuals |
imputed residuals from |
residCovEst |
residual covariance matrix used for estimation. |
residCov |
estimated residual covariance matrix. |
rweights |
matrix of robust weights. |
TSGS |
object from function |
control |
list of control parameters used for the estimation. |
df.residual |
degrees of freedom of the whole system. |
y |
response observations used in the second step. |
x |
design matrix used in the second step. |
Claudio Agostinelli and Giovanni Saraceno
Giovanni Saraceno, Fatemah Alqallaf and Claudio Agostinelli (2021?) A Robust Seemingly Unrelated Regressions For Row-Wise And Cell-Wise Contamination, submitted
library(systemfit) data("Kmenta") eqDemand <- consump~price+income eqSupply <- consump~price+farmPrice+trend system <- list(demand=eqDemand, supply=eqSupply) ## Robust estimation fitrob <- surerob(system, data=Kmenta) print(fitrob)
library(systemfit) data("Kmenta") eqDemand <- consump~price+income eqSupply <- consump~price+farmPrice+trend system <- list(demand=eqDemand, supply=eqSupply) ## Robust estimation fitrob <- surerob(system, data=Kmenta) print(fitrob)