My eventual successor here came up with two
Many causal discovery algorithms in R, such as pcalg and bnlearn, are designed to work with either continuous or discrete data. However, there are some causal discovery models in R that can handle mixed data, which contain both continuous and categorical variables. Here are a few options to consider:
- The "CAM" algorithm in the "CAM" R package: CAM stands for "Causal Additive Model" and is a causal discovery algorithm that can handle mixed data. It can identify both linear and nonlinear causal relationships between variables, and it uses a regression-based approach that is well-suited to mixed data.
- The "CCDr" algorithm in the "CCDr" R package: CCDr stands for "Causal Chain Discovery with Regression" and is another causal discovery algorithm that can handle mixed data. It uses a regression-based approach to identify causal chains, or sequences of causal relationships between variables.
Not bad, except that CCDr
doesn't appear on CRAN.
The similarly named CCCrAlgorithm
and CAM
packages are both archived.
A rseek.org search on causal discovery algorithm that can handle mixed data
yields the {MXM}
package which is mainly directed to feature engineering but claims to provide
conditional independence tests able to cope with a variety of data
types. These tests can be used alone (for inference or causal discovery)
The Causal Inference Taskview would be a good place to look for others.