使用与FELM模型的Interplot图来绘制相互作用效果
我正在尝试以图形方式对 R 中 felm
模型的交互效果进行建模。我正在使用 interplot
包来绘制效果图(理想情况下具有置信区间,正如我所见)使用正常的 lm
回归完成但是,当我使用 felm
进行编码时,我收到以下错误:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘sim’ for signature ‘"felm"’
一样简单
reg_test <- felm(data = dataframe, outcome ~ x*x_interaction + controls | country_fe + year_fe)
interplot::interplot(reg_test, var1 = "x", var2 = "x_interaction")
我的编码本质上与 Is interplot
。与 felm
不兼容,或者有什么方法可以使两者兼容并以图形方式绘制固定效应回归的交互效果?是否需要添加一些内容,或者我可以将 felm
转换为可以生成的格式吗?或者,除了 interplot
之外,还有其他包可以与 felm
一起使用并允许我生成具有置信区间的交互图吗?
I am trying to graphically model the interaction effect of an felm
model in R. I am using the interplot
package to graph the effects (ideally with confidence intervals, as I have seen done with normal lm
regressions. However, when I code with felm
, I receive the following error:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘sim’ for signature ‘"felm"’
My coding was as simple as
reg_test <- felm(data = dataframe, outcome ~ x*x_interaction + controls | country_fe + year_fe)
interplot::interplot(reg_test, var1 = "x", var2 = "x_interaction")
Is interplot
fundamentally incompatable with felm
, or is there a way I can make the two compatable and graphically plot the interaction effects of my fixed effect regression? Is there something I need to add, or can I convert the felm
into a format that makes generating the interaction plot work? Alternatively, is there another package than interplot
that would work with felm
and allow me to generate the interaction plot with confidence intervals?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论