Package 'spanel'

Title: Spatial Panel Data Models
Description: Fit the spatial panel data models: the fixed effects, random effects and between models. Compatibility updates by Renova.
Authors: Taha Zaghdoudi [aut, cre]
Maintainer: Taha Zaghdoudi <[email protected]>
License: GPL-3
Version: 0.1.9001
Built: 2026-11-15 20:39:12 UTC
Source: https://github.com/renova-r/spanel

Help Index


Spatial Panel Data Models

Description

Fit the spatial panel data models: the fixed effect model, between model and the random effect model.

Details

Package: spanel
Type: Package
Version: 1.0
Date: 2015-06-01
License: GPL-3

In this package, we apply the instrumental variables two stage estimation to fit the fixed effects, random effects and between spatial models.

Author(s)

Taha Zaghdoudi

Taha Zaghdoudi <[email protected]>

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.

Baltagi B, Egger P, Pfa???ermayr M (2006), A Generalized Spatial Panel Data Model with Random Effects, woking paper, Center For Policy Research, Syracuse University.

Munnell AH (1990). Why has Productivity Growth Declined? Productivity and Public Investment, New England Economic Review, pp. 3-22.

Examples

# Load data
 data(Produc)
 data("usaww")
 # fit the fixed function
 fx<-span(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,usaww,n=48,t=17,model="fe")
 # fit the random function
 summary(fx)
 #fit the between function
 be<-span(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,usaww,n=48,t=17,model="be")
 summary(be)
 # fit the random function
 ran<-span(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,usaww,n=48,t=17,model="re")
 summary(ran)

Hausman test

Description

Hausman test

Usage

hausman(fixed, random)

Arguments

fixed

is the fixed effect object function

random

is the random effect object function

Value

Chisq the hausman statistic

P-value the probability value

df the degree of freedom

Examples

data(Produc)
data("usaww")
#fit the fixed function
fx<-span(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,usaww,n=48,t=17,model="fe")
# fit the random function
 ran<-span(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,Produc,usaww,n=48,t=17,model="re")
# the Hausman test
hausman(fx,ran)

US States Production

Description

state

the state

year

the year

pcap

private capital stock

hwy

highway and streets

water

water and sewer facilities

util

other public buildings and structures

pc

public capital

gsp

gross state products

emp

labor input measured by the employement in non–agricultural payrolls

unemp

state unemployment rate

Usage

data(Produc)

Format

A data frame with 816 rows and 10 variables


method

Description

method

Usage

span(y, ...)

Arguments

y

the object used for method dispatch (a formula, or the response vector).

...

further arguments passed to methods

Author(s)

Zaghdoudi Taha


formula

Description

formula

Usage

## S3 method for class 'formula'
span(formula, data = list(), w, n, t, model = c("fe",
  "be", "re"), ...)

Arguments

formula

log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp

data

the dataframe

w

is the contiguity matrix

n

the number of section

t

the time per section

model

"fe" for fixed effect "be" for between and "re" for random effect

...

not used


Summary

Description

Summary

Usage

## S3 method for class 'span'
summary(object, ...)

Arguments

object

is the object of the function

...

not used


The contiguity matrix

Description

The contiguity matrix

Usage

data(usaww)