Linear regression using ordinary least squares (OLS) is a critical part of every statistician's toolkit. In R, this is elegantly implemented via lm() and its related functions. However, the statistical inference output from this suite of functions is based on the assumption that the model is well specified. This assumption is often unrealistic and at best satisfied approximately. In the statistics and econometrics literature, this has long been recognized and a large body of work provides inference for OLS under more practical assumptions. This can be seen as model-free inference. In this paper, we introduce our package maars ("models as approximations") that aims at bringing research on model-free inference to R via a comprehensive workflow. The maars package differs from other packages that also implement variance estimation, such as sandwich, in three key ways. First, all functions in maars follow a consistent grammar and return output in tidy format, with minimal deviation from the typical lm() workflow. Second, maars contains several tools for inference including empirical, multiplier, residual bootstrap, and subsampling, for easy comparison. Third, maars is developed with pedagogy in mind. For this, most of its functions explicitly return the assumptions under which the output is valid. This key innovation makes maars useful in teaching inference under misspecification and also a powerful tool for applied researchers. We hope our default feature of explicitly presenting assumptions will become a de facto standard for most statistical modeling in R.
翻译:使用普通最小平方( OLS) 的线性回归是每个统计家工具包的关键部分 。 在 R 中, 这是通过 lm () 及其相关功能优雅地执行的 。 但是, 这套功能的统计推导输出基于模型非常明确的假设 。 这个假设往往不切实际, 最多可以大致满足 。 在统计和计量经济学文献中, 长期以来人们都认识到这一点, 大量的工作在更实际的假设下为 OLS 提供了精确的推断 。 这可以被视为无模型的推断 。 在本文中, 我们引入了我们的一揽子模型( “ 模型作为近似 ” ), 目的是通过全面的工作流程将无模型推导出的研究带给 R 。 但是, 数学包也与其他软件包不同, 例如三明治, 三种主要方式。 首先, 马拉斯的所有函数都遵循一个一致的语法和返回格式, 与典型的Im( ) 工作流量略有偏离 。 其次, 数学中包含数种推论工具工具, 包括实验、 后期、 和亚程中最精确的精确的排序 。 。 将使得 直判中, 直判的 直判的 。 直判中, 直判的 直判的 。