library(survey)
data(api)
dclus2 <- svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
summary(svyglm(api00 ~ ell + meals + mobility, design = dclus2))
Call:
svyglm(formula = api00 ~ ell + meals + mobility, design = dclus2)
Survey design:
svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 819.2791 21.3900 38.302 4.65e-13 ***
ell -0.5167 0.3240 -1.595 0.139
meals -3.1232 0.2781 -11.231 2.29e-07 ***
mobility -0.1689 0.4449 -0.380 0.711
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 3157.85)
Number of Fisher Scoring iterations: 2
有没有像R平方或任何其他统计数据可以让读者了解模型对数据有多好?
感谢。
答案 0 :(得分:1)
2016年末出现了一个名为“poliscidata”的软件包,它有一个函数fit.svyglm,返回R square和Adj。 R square输出svyglm对象。我成功地使用了它。