Skip to content
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

Pull Request follow-up for #30: Example and Vignette runtime #56

Merged
merged 29 commits into from
May 11, 2024

Conversation

mcaceresb
Copy link
Collaborator

@mcaceresb mcaceresb commented Apr 28, 2024

This addresses the comments here that the computing time for the examples, tests, and vignette are too long.

  • Enclosed the examples in dontrun do they don't run, cutting the runtime.
  • Tests only run of HONESTDID_RUN_TESTS=1 is set, as suggested.
  • Precomputed the vignette results, as suggested.
    • The vignette looks slightly different but is by and large the same. See here.
    • Results are included them as data in the package. It gets its own documentation
    • The vignette/precompute.R script has all the vignette code and should be updated and re-run if the vignette ever changes. However, it's not included in the package build (see .Rbuildignore).

@mcaceresb
Copy link
Collaborator Author

@jonathandroth Can you test the function on your mac? The tests are failing for OSX but not for Linux somehow. Just wanna double-check there isn't an issue. LMK and I'll merge.

@jonathandroth
Copy link
Collaborator

I ran test_base.R (I assume that's what you wanted?) and I get the following error:

── Error (~/Library/CloudStorage/Dropbox/HonestDiD_MauricioGithub/HonestDiD/tests/test_base.R:28:5): HonestDiD base ran with no errors ──
Error in { temp = computeConditionalCS_DeltaSD(betahat = betahat, sigma = sigma, numPrePeriods = numPrePeriods, numPostPeriods = numPostPeriods, l_vec = l_vec, alpha = alpha, M = Mvec[m], hybrid_flag = "ARP") tibble::tibble(lb = base::min(temp$grid[temp$accept == 1]), ub = base::max(temp$grid[temp$accept == 1]), method = "Conditional", Delta = "DeltaSD", M = Mvec[m]) }: task 2 failed - "ℹ In index: 763.
Caused by error in if (sigma_B_dual < 10^(-10)) ...:
! missing value where TRUE/FALSE needed"
Backtrace:

  1. └─HonestDiD::createSensitivityResults(...) at HonestDiD/tests/test_base.R:28:4
  2. └─... %do% ... at HonestDiD/R/sensitivityresults.R:62:8
  3. └─e$fun(obj, substitute(ex), parent.frame(), e$data)
    

Error in reporter$stop_if_needed() : Test failed

@mcaceresb
Copy link
Collaborator Author

@jonathandroth Ok this is fixed. It seems sometimes it overflowed into a numerical zero but it was negative, so sqrt failed. I've accounted for this. I'll merge.

@mcaceresb mcaceresb merged commit fdadae3 into asheshrambachan:master May 11, 2024
2 checks passed
@mcaceresb mcaceresb deleted the cran-commit-round7 branch May 11, 2024 16:52
@mcaceresb mcaceresb restored the cran-commit-round7 branch May 11, 2024 16:52
@mcaceresb mcaceresb deleted the cran-commit-round7 branch May 11, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants