如何在zelig中获得模型拟合的度量(AIC,F统计量)以用于多次插补数据? [英] How to get measures of model fit (AIC, F-statistics) in zelig for multiply imputed data?

查看:159
本文介绍了如何在zelig中获得模型拟合的度量(AIC,F统计量)以用于多次插补数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关注 在较早的文章中,我有兴趣学习如何使用乘积插补数据(由Amelia创建)在zelig中获取统计模型相对质量的常规度量,以进行回归.

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).

问题

(1)有人知道如何为MI数据获取 AIC F统计量自由度的值吗?

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

(2)我找到了类似的问题 I. Koskuke Imai回答说,一个人可能可以对单个数据集的摘要所产生的度量进行简单的平均. 可能"使我有些怀疑.有什么想法吗?

(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?

非常感谢!

推荐答案

我与同事讨论了这个问题,我们都同意寻求Koskuke建议的解决方案.

I discussed the question with colleagues and we all agreed to go for the solution suggested by 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

这篇关于如何在zelig中获得模型拟合的度量(AIC,F统计量)以用于多次插补数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆