ywh19860616 发表于 2012-11-18 14:10 
epoh老师,我想请教下,在您写的代码中
#coda.out1
老兄,R package BayesPanel
应该适合你参考.
http://cran.r-project.org/src/contrib/Archive/BayesPanel/
#####
library(BayesPanel)
library(plm)
data(Gasoline)
est <- BayesPanel(lgaspcar~lincomep+lrpmg+lcarpcap|lincomep,
data=Gasoline, index = c("country"),
control = list(verbose=10, thin=100) )
Summary Statistics for Posterior Distribution:
The Model Specification is:
BayesPanel(formula = lgaspcar ~ lincomep + lrpmg + lcarpcap |
lincomep, data = Gasoline, index = c("country"), control = list(verbose = 10,
thin = 100))
Posterior Estimates of Fixed Effect Coefficients:
Iterations = 1001:10901
Thinning interval = 100
Number of chains = 1
Sample size per chain = 100
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
(Intercept) 2.1868 0.44051 0.044051 0.044051
lincomep 0.3698 0.11068 0.011068 0.011068
lrpmg -0.3246 0.04666 0.004666 0.004666
lcarpcap -0.4641 0.04210 0.004210 0.004210
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
(Intercept) 1.2418 1.9139 2.2340 2.5018 2.9245
lincomep 0.1246 0.3160 0.3750 0.4464 0.5572
lrpmg -0.4198 -0.3548 -0.3187 -0.2957 -0.2389
lcarpcap -0.5451 -0.4930 -0.4646 -0.4355 -0.3859
Posterior Mean Estimates of Random Coefficients:
(Intercept) lincomep
AUSTRIA 1.910348096 0.333092578
BELGIUM -0.215327621 -0.001088742
CANADA 1.152187949 0.090922766
DENMARK -1.838407500 -0.324946283
FRANCE 0.612314329 0.140129525
GERMANY 1.802215674 0.350771888
GREECE 1.312208989 0.180310358
IRELAND 1.587910877 0.229149729
ITALY 0.004301386 0.040926582
JAPAN -4.191993903 -0.689216994
NETHERLA -2.400792420 -0.383283336
NORWAY -0.131194057 -0.004403345
SPAIN -1.114354594 -0.126608625
SWEDEN 0.258225455 0.032832038
SWITZERL 1.005269013 0.171583757
TURKEY -2.224410353 -0.353748547
U.K. 1.538322575 0.270546584
U.S.A. 1.592090810 0.174681097
Posterior Estimates of Variance Structure for Random Coefficients:
Iterations = 1001:10901
Thinning interval = 100
Number of chains = 1
Sample size per chain = 100
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
(Intercept):(Intercept) 2.86597 1.06173 0.106173 0.153698
lincomep:(Intercept) 0.45888 0.16832 0.016832 0.023458
lincomep:lincomep 0.07573 0.02713 0.002713 0.002824
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
(Intercept):(Intercept) 1.51928 2.15398 2.58854 3.32357 5.3332
lincomep:(Intercept) 0.23322 0.34598 0.42955 0.53947 0.8216
lincomep:lincomep 0.03904 0.05631 0.07156 0.09101 0.1302
Posterior Estimates of Variance:
Iterations = 1001:10901
Thinning interval = 100
Number of chains = 1
Sample size per chain = 100
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
0.0087293 0.0007850 0.0000785 0.0000785
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
0.007159 0.008182 0.008735 0.009255 0.010253