在Stata和Stan中拟合贝叶斯项目反应模型
Fitting Bayesian item response models in Stata and Stan
摘要:
Stata用户可以访问两个易于使用的贝叶斯推断实现:Stata的原生{ \tt bayesmh}函数和StataStan,它调用通用贝叶斯引擎Stan。我们比较了这两个模型,是重要的教育研究:拉希模型和层次拉希模型。Stan(Stata中的名称)比{ \tt bayesmh}拟合的模型范围更广,并且具有更高的可扩展性,因为它可以轻松地拟合具有至少十倍于Stata原生贝叶斯实现的参数的模型。此外,以每秒有效样本量衡量,Stan的运行速度比{ \tt bayesmh}快2到10倍:也就是说,与Stan相比,Stata的内置贝叶斯引擎需要2到10倍的时间才能获得同等精度的推断。我们属性斯坦的灵活性,其通用的建模语言的优势,其在可扩展性和速度的一个有效的采样算法:哈密顿蒙特卡罗使用无掉头采样器的优势。为了进一步研究可扩展性,我们还比较了软件包Jags,它比Stata的原生贝叶斯引擎性能更好,但不如StataStan。鉴于Stan在速度、通用性和可扩展性方面的优势,并且Stan是开源的,可以使用StataStan直接从Stata运行,我们建议Stata用户采用Stan作为他们的贝叶斯推断引擎。
英文摘要:
Stata users have access to two easy-to-use implementations of Bayesian inference: Stata's native {\tt bayesmh} function and StataStan, which calls the general Bayesian engine Stan. We compare these on two models that are important for education research: the Rasch model and the hierarchical Rasch model. Stan (as called from Stata) fits a more general range of models than can be fit by {\tt bayesmh} and is also more scalable, in that it could easily fit models with at least ten times more parameters than could be fit using Stata's native Bayesian implementation. In addition, Stan runs between two and ten times faster than {\tt bayesmh} as measured in effective sample size per second: that is, compared to Stan, it takes Stata's built-in Bayesian engine twice to ten times as long to get inferences with equivalent precision. We attribute Stan's advantage in flexibility to its general modeling language, and its advantages in scalability and speed to an efficient sampling algorithm: Hamiltonian Monte Carlo using the no-U-turn sampler. In order to further investigate scalability, we also compared to the package Jags, which performed better than Stata's native Bayesian engine but not as well as StataStan. Given its advantages in speed, generality, and scalability, and that Stan is open-source and can be run directly from Stata using StataStan, we recommend that Stata users adopt Stan as their Bayesian inference engine of choice.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。