Stata 的 xtnbreg 有 R 函数吗? [英] is there an R function for Stata's xtnbreg?

查看:61
本文介绍了Stata 的 xtnbreg 有 R 函数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一直在使用 Stata 在复制中运行负二项式回归.不确定 Stata 如何做到这一点,但想知道是否有一个 R 函数/包可以做同样的事情?R 会让我更好地了解它是如何工作的,因为我可以看到代码.

Have been using Stata to run negative binomial regressions in a replication. Not sure what is under the hood on how Stata does this, but wanted to know if there is an R function/package that does the same thing? The R will give me a better idea of how this works, since I can see the code.

推荐答案

查看 MASS 包中的 glm.nb 函数.如果您对幕后"发生的事情感兴趣,只需在命令提示符下输入函数名称即可查看该函数的源代码.

Look into the glm.nb function in the MASS package. If you're interested in what's happening "under the hood," you can see the source code of the function by just entering its name at the command prompt.

这篇关于Stata 的 xtnbreg 有 R 函数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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