arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1412.3565stat.COstat.ME
收藏

一个将统计分析对象转换为整洁数据框的R包

broom: An R Package for Converting Statistical Analysis Objects Into Tidy Data Frames

David Robinson

摘要:

“整洁数据”的概念为结构化数据提供了一个强大的框架,以简化操作、建模和可视化。然而,大多数R函数,无论是内置的还是在第三方包中找到的,都产生不整洁的输出,因此很难重塑,重组和以其他方式操作。在这里,我将介绍broom包,它将模型对象的输出转换为整洁的数据帧,这些数据帧适合于使用输入整洁工具进行进一步的分析、操作和可视化。Broom定义了“tidy”、“augment”和“glance”泛型,它们将模型分别安排为三个级别的整洁输出:组件级别、观察级别和模型级别。我提供了一些示例来演示这些泛型如何与整洁的工具一起工作,以允许对划分为子集的数据进行分析和建模,重新组合自举复制的结果,并执行模拟来研究不同输入参数的影响。

英文摘要:

The concept of "tidy data" offers a powerful framework for structuring data to ease manipulation, modeling and visualization. However, most R functions, both those built-in and those found in third-party packages, produce output that is not tidy, and that is therefore difficult to reshape, recombine, and otherwise manipulate. Here I introduce the broom package, which turns the output of model objects into tidy data frames that are suited to further analysis, manipulation, and visualization with input-tidy tools. Broom defines the "tidy", "augment" and "glance" generics, which arrange a model into three levels of tidy output respectively: the component level, the observation level, and the model level. I provide examples to demonstrate how these generics work with tidy tools to allow analysis and modeling of data that is divided into subsets, to recombine results from bootstrap replicates, and to perform simulations that investigate the effect of varying input parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑