本文介绍了使用Stargazer或其他软件包在Knitr中呈现Zelig Logistic回归的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
除逻辑回归外,Stargazer似乎采用了大多数Zelig模型对象:
Stargazer appears to take most Zelig model objects except logistic regression:
m1 <- zelig(voted ~ . - weight_full - by,
weights = mydata$weight_full,
data=mydata,
model="logit",
cite = FALSE)
我从上面的代码中收到以下警告:
I receive the following warning from the above code:
# Error in envRefInferField(x, what, getClass(class(x)), selfEnv)
# ‘result’ is not a valid field or method name for reference class "Zelig-logit"
任何人都可以使用Knitr在回归输出表中呈现这样的模型来生成.tex/.Rnw文件吗?
Anyone have any alternatives for presenting such a model in a regression output table using Knitr to produce a .tex/.Rnw file?
推荐答案
Zegig软件包现在包括一个便捷功能,可以轻松提取拟合的模型对象:
The Zelig package now includes a convenience function that makes it easy to extract fitted model objects:
stargazer(from_zelig_model(m1))
应该产生预期的结果.
这篇关于使用Stargazer或其他软件包在Knitr中呈现Zelig Logistic回归的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!