This article explains the usage of R package CausalModels, which is publicly available on the Comprehensive R Archive Network. While packages are available for sufficiently estimating causal effects, there lacks a package that provides a collection of structural models using the conventional statistical approach developed by Hern\'an and Robins (2020). CausalModels addresses this deficiency of software in R concerning causal inference by offering tools for methods that account for biases in observational data without requiring extensive statistical knowledge. These methods should not be ignored and may be more appropriate or efficient in solving particular problems. While implementations of these statistical models are distributed among a number of causal packages, CausalModels introduces a simple and accessible framework for a consistent modeling pipeline among a variety of statistical methods for estimating causal effects in a single R package. It consists of common methods including standardization, IP weighting, G-estimation, outcome regression, instrumental variables and propensity matching.
翻译:本文阐述R包CausalModels的使用方法,该包已在CRAN( Comprehensive R Archive Network)上公开发布。尽管现有多个R包可用于充分估计因果效应,但尚无软件包能提供基于Hernán和Robins(2020)经典统计学方法的完整结构模型集合。CausalModels通过提供无需深厚统计学知识即可处理观察性数据偏倚的方法工具,弥补了R语言在因果推断领域的软件缺失。这些方法不应被忽视,且在解决特定问题时可能更具适用性或效率。虽然这些统计模型的实现分散于多个因果推断相关包中,但CausalModels引入了一个简洁易用的框架,通过统一的建模流程在单一R包中整合了多种因果效应估计的统计方法,包括标准化法、逆概率加权法、G估计法、结果回归法、工具变量法及倾向性评分匹配法等常用方法。