【发布时间】:2018-11-07 06:07:22
【问题描述】:
我正在使用库 micEconAids 从估计中寻找更漂亮的输出。 stargazer 似乎不起作用,除非我使用 lm 或其他看似不相关的方程的回归包“手动”估计方程。包实现的一些方法我可以自己复制,但不是全部。
那么,除了summary 的回归输出之外,还有什么替代方法可以给我更好的输出?
下面我粘贴了一些代码来举例说明问题:
rm(list=ls())
library(micEconAids)
data(Blanciforti86)
priceNames = c( "pFood1", "pFood2", "pFood3", "pFood4" )
shareNames = c( "wFood1", "wFood2", "wFood3", "wFood4" )
laaidsResult1 = aidsEst( priceNames, shareNames, "xFood", data = Blanciforti86,
priceIndex = "S" )
laaidsResult2 = aidsEst( priceNames, shareNames, "xFood", data = Blanciforti86,
priceIndex = "P" )
laaidsResult3 = aidsEst( priceNames, shareNames, "xFood", data = Blanciforti86,
priceIndex = "SL" )
summary(laaidsResult1)
summary(laaidsResult2)
summary(laaidsResult3)
#Stargazer does not work with `micEconAids`:
stargazer::stargazer(laaidsResult1, laaidsResult2, laaidsResult3)
#What are the alternatives for showing a prettier output?
#######################################################################################################################
#In the previous examples, an AIDS model was regressed.
#Below there is an example of how the models could/should look like -- in a three equation setup --
#using `lm` function, which works with `stargazer`.
reg1 = lm(Blanciforti86$wFood1 ~ Blanciforti86$pFood1)
reg2 = lm(Blanciforti86$wFood2 ~ Blanciforti86$pFood2)
reg3 = lm(Blanciforti86$wFood3 ~ Blanciforti86$pFood3)
stargazer::stargazer(reg1,reg2,reg3, type="text")
【问题讨论】:
标签: r regression stargazer