COLP {COLP} | R Documentation |
Estimate a causal directed acyclic graph (DAG) for ordinal cateogrical data with greedy or exhaustive search.
COLP(y, x, algo = "E")
y |
factor, a potential effect variable |
x |
factor, a potential cause variable |
algo |
exhaustive search (algo="E") of category ordering or greedy search (algo="G") |
A list of length 3. cd = 1 if x causes y; cd = 0 otherwise. P is the optimal odering of the effect variable. epsilon is the difference in log-likelihood favoring x causes y.
fit = COLP(CatPairs[[1]][[1]]$Diffwt,CatPairs[[1]][[1]]$Treat,algo="E")
fit$cd