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.
This is a follow-up to #1224
Part 1: Resolving the error message
This is the full traceback that I get when calling
hypotheses(m, "b1 = b2")
, as shown in the minimum reproducible example in the original issue.func()
refers toinner()
defined inget_delta_se.R
func()
adds an element callednewparams
to the argument listargs
"FUN"
refers toFUNouter()
defined inhypotheses.R
FUNouter()
only expects the argumentsmodel
andhypothesis
, but the additionalnewparams
argument is passed, leading to the errorFUNouter()
by adding an...
to allow for additional argumentsdevtools::check()
and it passed with no errors, warnings, or notesPart 2: Standard error returned is
NA
When I call
hypotheses(m, "b1 = b2")
after updatingFUNouter()
, I get the following output:The returned data frame gives a sensible estimate, but the remaining columns are all
NA
.get_se_delta.R
is a matrix where all entries are 0se
calculated on line 136 is also 0, which gets overwritten byNA_real_
in the following lineget_ci()
all return NAinner_loop()
function defined inget_jacobian_fdforward()
withinget_jacobian.R
?This is pushing my limited knowledge of matrices and the delta method, so I'm not sure if the
NA
values are expected behaviour or if they indicate a deeper issue.Thanks for your help!