Improved performance of numerical integration #8
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.
Hi Joshua,
We have been using {JointFPM} for a couple of projects and struggled a bit with the computational time when standardising over covariates other than the comparison of interest (e.g., a treatment).
I went back to the code and after some experimenting, I re-implemented the underlying numerical integration with nice results (see a formal comparison here). This PR adds this on top of the existing Romberg integration (which is still the default method here), as that method has a nice iterate until convergence feature (compared to Gaussian quadrature, where performance depends on how many integration points we use). I think Romberg is, possibly, a better default as it does not require the user picking the number of integration points, but I'd be happy to discuss this more if you'd like!
This PR doesn't recompile the documentation – for that, I encountered some issues with the latest {roxygen2} (7.3.0) and the import statements from {data.table} (I will open a separate issue for that).
Hope this helps and, as always, happy to chat more about this any time!
Alessandro