Completed documentation & testing for causal.effect functions
I documented 5 causaleffect functions, including simplify, join, insert, powerset, and parse.expression. causal.effect already had documentation from Tikka.
There are 25 total unit tests created using the testthat R package. 23/25 unit tests pass. I tested 6 functions per vignette (includes topo, which is undocumented because it's an igraph function)
There are 3 vignettes/test cases from causal.effect on CRAN: 1st with unobserved confounders, 2nd with pruning & fractions, and 3rd with simplest graph possible (no unobserved confounders). I created a unit test for each function per vignette: 7 unit tests for test_case_1, 9 unit tests for test_case_2, and 9 unit tests for test_case_3.
[X] topo — 3/3 unit tests created; this is an igraph function so no documentation created; this is an igraph function with igraph::topo_sort(G) and get.vertex.attribute(G, "name")[topo]
[X] simplify (Algorithm 1 in Tikka & Karvanen (2017)) — created working .Rd file & 3/3 unit tests
[X] causal.effect - Tikka already has a .Rd file but might need clarification; created 3/3 unit tests
[X] parse.expression — created working .Rd file & 3/3 unit tests
Needs work
[ ] join (Algorithm 2 in Tikka & Karvanen (2017)) — created working .Rd file & 2/3 unit tests. Does not pass for Vignette 2. Need to go back into test_case_2 and use causal.effect with expr = FALSE (try to plug result into ChatGPT) to remake P_2_pe1, P_2_pe2 (for parse.expression), P_2_s1, and P_2_s2 (for simplify) in order to successfully iterate through parse.expression and then simplify with breakpoints and obtain join inputs from print statements
[ ] insert (Algorithm 3 in Tikka & Karvanen (2017)) — created working .Rd file & 2/3 unit tests. Does not pass for Vignette 2 (^^ see above)
[ ] powerset — created working .Rd file; still needs examples & unit tests
[ ] get.expression — Tikka already has a .Rd file but might need clarification
Completed documentation & testing for
causal.effect
functionsI documented 5
causaleffect
functions, includingsimplify
,join
,insert
,powerset
, andparse.expression
.causal.effect
already had documentation from Tikka.There are 25 total unit tests created using the
testthat
R package. 23/25 unit tests pass. I tested 6 functions per vignette (includestopo
, which is undocumented because it's anigraph
function) There are 3 vignettes/test cases fromcausal.effect
on CRAN: 1st with unobserved confounders, 2nd with pruning & fractions, and 3rd with simplest graph possible (no unobserved confounders). I created a unit test for each function per vignette: 7 unit tests for test_case_1, 9 unit tests for test_case_2, and 9 unit tests for test_case_3.topo
— 3/3 unit tests created; this is anigraph
function so no documentation created; this is anigraph
function withigraph::topo_sort(G)
andget.vertex.attribute(G, "name")[topo]
simplify
(Algorithm 1 in Tikka & Karvanen (2017)) — created working .Rd file & 3/3 unit testscausal.effect
- Tikka already has a .Rd file but might need clarification; created 3/3 unit testsparse.expression
— created working .Rd file & 3/3 unit testsNeeds work
join
(Algorithm 2 in Tikka & Karvanen (2017)) — created working .Rd file & 2/3 unit tests. Does not pass for Vignette 2. Need to go back into test_case_2 and use causal.effect with expr = FALSE (try to plug result into ChatGPT) to remake P_2_pe1, P_2_pe2 (forparse.expression
), P_2_s1, and P_2_s2 (forsimplify
) in order to successfully iterate throughparse.expression
and thensimplify
with breakpoints and obtainjoin
inputs from print statementsinsert
(Algorithm 3 in Tikka & Karvanen (2017)) — created working .Rd file & 2/3 unit tests. Does not pass for Vignette 2 (^^ see above)powerset
— created working .Rd file; still needs examples & unit testsget.expression
— Tikka already has a .Rd file but might need clarificationdeconstruct
dSep
wrap.dSep
factorize
probability