2

Following up on an earlier post, I am interested in learning how to get the usual measures of the relative quality of a statistical model in zelig for regression using multiply imputed data (created with Amelia).

require(Zelig)
require(Amelia)
data(freetrade)

#Imputation of missing data
a.out <- amelia(freetrade, m=5, ts="year", cs="country")

# Regression model
z.out <- zelig(polity~tariff+gdp.pc, model="ls", data=a.out$imputations)

summary(z.out)

Model: ls
  Number of multiply imputed data sets: 5 
Combined results:
Call:
lm(formula = formula, weights = weights, model = F, data = data)
Coefficients:
                   Value   Std. Error    t-stat    p-value
(Intercept) 1.6740501340 1.0270535468 1.6299541 0.10342186
tariff      0.0196015092 0.0233789523 0.8384255 0.40234214
gdp.pc      0.0003296261 0.0001844909 1.7866798 0.07409327
For combined results from datasets i to j, use summary(x, subset = i:j).
For separate results, use print(summary(x), subset = i:j).

Question

(1) Does anyone know how to get the values of AIC, F-statistics and the degree of freedoms for MI data?

(2) I found a similar question to which Koskuke Imai replied that one can probably take a simple average of the measures produced by the summaries of the individual datasets. The "probably" makes me a bit suspicious. Any thoughts on this?

Many thanks!!

4

1 回答 1

1

我与同事讨论了这个问题,我们都同意采用 Koskuke 建议的解决方案。

x1 <- summary(z.out[[1]])
x2 <- summary(z.out[[2]])
x3 <- summary(z.out[[3]])
x4 <- summary(z.out[[4]])
x5 <- summary(z.out[[5]])

#F-statistics
(x1$fstatistic[1]+x1$fstatistic[1]+x3$fstatistic[1]+x4$fstatistic[1]+x5$fstatistic[1])/5

#AIC
(AIC(z.out[[1]])+AIC(z.out[[2]])+AIC(z.out[[3]])+AIC(z.out[[4]])+AIC(z.out[[5]]))/5
于 2013-05-23T10:12:11.960 回答