找了个数据格式跟你类似
的data "Produc" US States Production
做个panel linear model比较.
A panel of 48 observations from 1970 to 1986
total number of observations : 816
observation : regional
country : United States
state year pcap hwy water
1 ALABAMA 1970 15032.67 7325.80 1655.68
2 ALABAMA 1971 15501.94 7525.94 1721.02
3 ALABAMA 1972 15972.41 7765.42 1764.75
4 ALABAMA 1973 16406.26 7907.66 1742.41
5 ALABAMA 1974 16762.67 8025.52 1734.85
6 ALABAMA 1975 17316.26 8158.23 1752.27
7 ALABAMA 1976 17732.86 8228.19 1799.74
8 ALABAMA 1977 18111.93 8365.67 1845.11
9 ALABAMA 1978 18479.74 8510.64 1960.51
10 ALABAMA 1979 18881.49 8640.61 2081.91
11 ALABAMA 1980 19012.34 8663.50 2138.52
12 ALABAMA 1981 19118.52 8628.83 2218.91
13 ALABAMA 1982 19118.25 8645.14 2215.84
14 ALABAMA 1983 19122.00 8612.47 2230.91
15 ALABAMA 1984 19257.47 8655.94 2235.16
16 ALABAMA 1985 19433.36 8726.24 2253.03
17 ALABAMA 1986 19723.37 8813.24 2308.99
18 ARIZONA 1970 10148.42 4556.81 1627.87
19 ARIZONA 1971 10560.54 4701.97 1627.34
20 ARIZONA 1972 10977.53 4847.84 1614.58
...............
####
library(plm)
data("Produc", package = "plm")
iwi<- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
effect = "individual",model = "within",data = Produc, index = c("state","year"))
summary(iwi)
####
Oneway (individual) effect Within Model
Call:
plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp,
data = Produc, effect = "individual", model = "within", index = c("state",
"year"))
Balanced Panel: n=48, T=17, N=816
Residuals :
Min. 1st Qu. Median 3rd Qu. Max.
-0.12000 -0.02370 -0.00204 0.01810 0.17500
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
log(pcap) -0.02614965 0.02900158 -0.9017 0.3675
log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 ***
log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 ***
unemp -0.00529774 0.00098873 -5.3582 1.114e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 18.941
Residual Sum of Squares: 1.1112
F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16
#####
#####
撷取transformed data做block bootstrap
xplm.txt
xplm.txt
(60.06 KB)
yplm.txt
yplm.txt
(15.89 KB)


雷达卡
京公网安备 11010802022788号







