forked from santikka/causaleffect
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test and document Santu Tikka's causaleffect
R package
#8
Open
hmhummel
wants to merge
42
commits into
master
Choose a base branch
from
test-and-document
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nit tests on test-simplify.R
This file contains all 3 test cases compiled into 1 file.
…n unit test with causal.effect simp = TRUE
…ed out the simplify.R function file
delete previously-created simplify .Rd documentation in order to ensure no conflict with roxygen-created simplify (cannot modify .Rd files by hand; must use roxygen)
…d Encoding = UTF-8. Updated NAMESPACE file to include export(simplify). Updated simplify.R to include working documentation when ?simplify is run.
…simplify.Rd documentation. Added export(join) to NAMESPACE.
…ion documentation files with the test example.
…aph are causaleffect functions, not igraph.
…on file. Added an insert unit test to test case 1.
…matting changes to test case #2. Updated all_3_test_cases document to reflect changes. Began documenting powerset.R
…to fix unit tests for join and insert but did not succeed.
…ests for reproducibility
…d join.Rd files can now link to parse.expression as well.
…3/25 unit tests pass.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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.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