s2sls-package: Spatial Two Stage Least Squares estimation

Description Details Author(s) References Examples

Description

Fit a spatial instrumental-variable regression by two-stage least squares.

Details

Package: S2sls
Type: Package
Version: 1.0
Date: 2016-01-06
License: GPL-3

S2sls(Y~X,data,W) Spatial Two Stage Least Squares Estimation computes spatial instrumental variables s2SLS estimation where Y is the vector of the dependant variable, X is the matrix of the independent variables and W is the contiguity matrix.

Author(s)

Taha Zaghdoudi

Taha Zaghdoudi <zedtaha@gmail.com>

References

Amemiyia T. (1971), The estimation of the variances in a variance–components model, International Economic Review, 12, pp.1–13.

Baltagi B.H. (1981), Simultaneous equations with error components, Journal of econometrics, 17, pp.21–49.

Baltagi B.H. (2001), Econometric Analysis of Panel Data. John Wiley and sons. ltd.

Millo, G., Piras, G. (2012) splm: Spatial Panel Data Models in R. Journal of Statistical Software, 47(1), 1–38. URL http://www.jstatsoft.org/v47/i01/.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 # Load data
 data(Produc,package="spanel")
 data(usaww,package="spanel")
 # The contiguity matrix w must be a square matrix with size[nrow(log(gsp)),nrow(log(gsp))]
 # so for our example we transform usaww to a square matrix:
 ww<-as.matrix(usaww)
 h<-kronecker(ww,diag(17))
 # fit spatial two stage least squares model
 ran<-s2sls(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,h)
 summary(ran)

Example output

Attaching package: 'S2sls'

The following object is masked from 'package:base':

    summary

Formula:log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
             Estimates    Std.Err T-value   P-Value    
(Intercept)  1.7427498  0.0895334 19.4648 < 2.2e-16 ***
log(pcap)    0.1479031  0.0178019  8.3083 4.069e-16 ***
log(pc)      0.3092135  0.0102474 30.1748 < 2.2e-16 ***
log(emp)     0.6021717  0.0148472 40.5579 < 2.2e-16 ***
unemp       -0.0062039  0.0014595 -4.2508 2.378e-05 ***
            -0.0087338  0.0060310 -1.4482     0.148    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

S2sls documentation built on May 2, 2019, 12:19 p.m.

Related to s2sls-package in S2sls...